File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 28
28
29
29
- name : Compile
30
30
run : yarn && yarn test
31
+
32
+ publish :
33
+ needs : [ compile, test ]
34
+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
35
+ runs-on : ubuntu-latest
36
+ steps :
37
+ - name : Checkout repo
38
+ uses : actions/checkout@v3
39
+ - name : Set up node
40
+ uses : actions/setup-node@v3
41
+ - name : Install dependencies
42
+ run : yarn install
43
+ - name : Build
44
+ run : yarn build
45
+
46
+ - name : Publish to npm
47
+ run : |
48
+ npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
49
+ if [[ ${GITHUB_REF} == *alpha* ]]; then
50
+ npm publish --access public --tag alpha
51
+ elif [[ ${GITHUB_REF} == *beta* ]]; then
52
+ npm publish --access public --tag beta
53
+ else
54
+ npm publish --access public
55
+ fi
56
+ env :
57
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments