File tree Expand file tree Collapse file tree 1 file changed +15
-28
lines changed
Expand file tree Collapse file tree 1 file changed +15
-28
lines changed Original file line number Diff line number Diff line change 1- # This workflow will publish the package to npm when a release is created
2- # Uses OIDC trusted publishing for secure, tokenless authentication
3-
4- name : npm-publish
1+ name : Publish Package
52
63on :
7- release :
8- types : [published]
9- workflow_dispatch :
4+ push :
5+ tags :
6+ - ' v* '
107
118permissions :
9+ id-token : write # Required for OIDC
1210 contents : read
13- id-token : write
1411
1512jobs :
1613 publish :
1714 runs-on : ubuntu-latest
1815 steps :
19- - name : Checkout code
20- uses : actions/checkout@v4
21- with :
22- fetch-depth : 0
23-
24- - name : Setup Node.js
25- uses : actions/setup-node@v4
26- with :
27- node-version : ' 20'
28- cache : ' npm'
29- registry-url : ' https://registry.npmjs.org'
30-
31- - name : Install dependencies
32- run : npm ci
33-
34- - name : Build package
35- run : npm run build
36-
37- - name : Publish to npm
38- run : npm publish --provenance --access public
16+ - uses : actions/checkout@v4
17+
18+ - uses : actions/setup-node@v4
19+ with :
20+ node-version : ' 24'
21+ registry-url : ' https://registry.npmjs.org'
22+ - run : npm ci
23+ - run : npm run build --if-present
24+ - run : npm test
25+ - run : npm publish
You can’t perform that action at this time.
0 commit comments