Skip to content

Commit 75213c3

Browse files
authored
chore: provenance tag added ti publish command.
1 parent 2d98a5f commit 75213c3

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/npm-publish.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
1+
# This workflow will run tests using node and then publish a package to NPM when a release is created
22
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
33

44
name: Publish Package
@@ -7,17 +7,31 @@ on:
77
release:
88
types: [published]
99

10+
permissions:
11+
id-token: write
12+
contents: read
13+
1014
jobs:
1115
publish-npm:
1216
runs-on: ubuntu-latest
17+
1318
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-node@v4
19+
- name: 📥 Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: 🛠 Setup Node.js
23+
uses: actions/setup-node@v4
1624
with:
1725
node-version: '20.x'
1826
registry-url: 'https://registry.npmjs.org'
19-
- run: npm i
20-
- run: npm run build
21-
- run: npm publish --access public
27+
28+
- name: 📦 Install dependencies
29+
run: npm ci
30+
31+
- name: 🔨 Build project
32+
run: npm run build
33+
34+
- name: ☁️ Publish to NPM with provenance
35+
run: npm publish --access public --provenance
2236
env:
23-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
37+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

0 commit comments

Comments
 (0)