Skip to content

Commit c333604

Browse files
authored
Create publish.yml to publish NPM releases
1 parent 3641ccf commit c333604

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Verify and Publish
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 18
15+
registry-url: https://registry.npmjs.org/
16+
- name: Install
17+
run: npm ci
18+
- name: Test
19+
run: npm test
20+
- name: Publish
21+
run: |
22+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
23+
npm publish --access public
24+
env:
25+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)