Skip to content

Commit 22678a9

Browse files
authored
Merge pull request #18 from BowTiedRadone/ci/automated-npm-publish
Add automated npm publish workflow
2 parents bf1d6b7 + 042672b commit 22678a9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/npm-publish-release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: npm-publish
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish:
7+
environment: 'Publish to NPM'
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '22'
17+
registry-url: 'https://registry.npmjs.org'
18+
- run: npm ci
19+
- run: npm test
20+
- run: npm publish --provenance --access public
21+
env:
22+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)