Skip to content

Commit a2c0afb

Browse files
authored
[ci] Refactor npm publish workflow (#1117)
Updated the workflow to publish on npm with new node version and removed unnecessary steps.
1 parent 3822666 commit a2c0afb

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
# After new release is published on github, publish it to npmjs
2-
name: Publish on npmjs
3-
1+
name: Publish on npm
42
on:
53
release:
64
types: [published]
75

86
jobs:
97
publish:
108
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
1113
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
1417
with:
15-
node-version: 16
18+
node-version: 20
1619
registry-url: 'https://registry.npmjs.org'
20+
1721
- run: npm ci
18-
- run: npm publish --access public
19-
env:
20-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
21-
- uses: apexskier/github-release-commenter@v1
22-
with:
23-
GITHUB_TOKEN: ${{ secrets.REPO_GHA_PAT }}
24-
comment-template: |
25-
Release {release_link} addresses this.
22+
23+
- run: npm publish --provenance --access public

0 commit comments

Comments
 (0)