Skip to content

Commit 7ad2a39

Browse files
committed
automate publishing to npmjs
1 parent 58b938e commit 7ad2a39

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,22 @@ jobs:
5050
AWS_SECRET_ACCESS_KEY: ${{ secrets.KEYSECRET_AKIAWS5577QLD5TL6AZN }}
5151
AWS_REGION: ${{ matrix.region }}
5252
CI: true
53+
54+
55+
# publish if the version number in package.json differs from the latest on NPM
56+
publish:
57+
needs: test
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v2
61+
- name: Use Node.js 10
62+
uses: actions/setup-node@v1
63+
with:
64+
node-version: 10
65+
66+
- run: npm install
67+
- run: npm test
68+
- uses: JS-DevTools/npm-publish@v1
69+
with:
70+
token: ${{ secrets.NPM_TOKEN }}
71+
access: public

0 commit comments

Comments
 (0)