Skip to content

Commit b1c4186

Browse files
committedJan 8, 2025
publish to npm as well as release page on release
1 parent 8b60008 commit b1c4186

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed
 

‎.github/workflows/release.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,27 @@ jobs:
1212

1313
do_release:
1414
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
id-token: write
1518
steps:
1619
- uses: actions/checkout@v4
1720
- name: setup node
1821
uses: actions/setup-node@v4
1922
with:
20-
node-version: '14'
23+
node-version: '22'
24+
registry-url: 'https://registry.npmjs.org'
2125
- name: Build library
2226
run: |
2327
npm install
2428
npm run build
29+
- name: Publish to npmjs
30+
if: startsWith(github.ref, 'refs/tags')
31+
run: npm publish --provenance --access public
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
- name: Pack library
35+
run: |
2536
npm pack
2637
echo "NPM_TGZ=$(ls jsfive*.tgz)" >> $GITHUB_ENV
2738
- name: Upload artifact

0 commit comments

Comments
 (0)
Failed to load comments.