Skip to content

Commit 51e560e

Browse files
committed
publish on tag if unit and integration tests pass
1 parent f8e047c commit 51e560e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,18 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v1
2020
- name: Test
21-
run: tests/test.sh
21+
run: tests/test.sh
22+
publish:
23+
needs: [unit-test, integration-test]
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v1
28+
- name: Publish
29+
if: startsWith(github.ref, 'refs/tags/')
30+
run: |
31+
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
32+
npm publish
33+
env:
34+
CI: true
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)