We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 163c39f commit 64bbb03Copy full SHA for 64bbb03
.github/workflows/publish.yml
@@ -0,0 +1,30 @@
1
+name: Publish to npm
2
+
3
+on:
4
+ release:
5
+ types: [created]
6
7
+permissions:
8
+ contents: read
9
+ id-token: write
10
11
+jobs:
12
+ publish-npm:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: 22
19
+ registry-url: https://registry.npmjs.org/
20
+ cache: npm
21
+ - run: npm ci
22
+ - run: npm test
23
+ - run: |
24
+ echo "Publishing $TAG_NAME"
25
+ npm version ${TAG_NAME} --git-tag-version=false
26
+ env:
27
+ TAG_NAME: ${{github.event.release.tag_name}}
28
+ - run: npm whoami; npm publish --provenance --access public
29
30
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
0 commit comments