Skip to content

Commit d0679ea

Browse files
authored
create promote.yml github action
1 parent c59bfef commit d0679ea

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/promote.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: promote
2+
on:
3+
push:
4+
# Sequence of patterns matched against refs/tags
5+
tags:
6+
- v5.*
7+
jobs:
8+
build-and-promote:
9+
runs-on: ubuntu-latest
10+
env:
11+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
13+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Build for promotion
17+
run: yarn install --frozen-lockfile && yarn build
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: '16.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
- name: GitHub Tag Name example
23+
run: |
24+
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
25+
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
26+
- name: Manual publish
27+
run: |
28+
cd packages/module
29+
npm version ${{ github.ref_name }} --git-tag-version false
30+
npm publish --tag=latest

0 commit comments

Comments
 (0)