Skip to content

Commit d24dafc

Browse files
committed
npm publish fix - re write publish logic
1 parent 7e11c70 commit d24dafc

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
1+
# This workflow publishes the package to npm using Trusted Publishers (OIDC)
2+
# For more information see: https://docs.npmjs.com/generating-provenance-statements
33

44
name: Node.js Package
55

@@ -8,16 +8,7 @@ on:
88
types: [created]
99

1010
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v2
16-
with:
17-
node-version: 22
18-
1911
publish-npm:
20-
needs: build
2112
runs-on: ubuntu-latest
2213
permissions:
2314
contents: read
@@ -28,16 +19,11 @@ jobs:
2819
with:
2920
node-version: 22
3021
registry-url: https://registry.npmjs.org/
31-
env:
32-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_SHEET}}
33-
- run: npm install
22+
- run: npm ci
3423
- run: npm run build
3524
- run: npm publish --provenance --access public
36-
env:
37-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN_SHEET}}
3825

3926
publish-gpr:
40-
needs: build
4127
runs-on: ubuntu-latest
4228
permissions:
4329
contents: read

0 commit comments

Comments
 (0)