File tree Expand file tree Collapse file tree 1 file changed +21
-23
lines changed Expand file tree Collapse file tree 1 file changed +21
-23
lines changed Original file line number Diff line number Diff line change 1- # This filename is associated with the respective NPM package's trusted publish config.
2- # If required, update both together.
3-
4- name : Package Release
1+ name : Publish to npm
52
63on :
74 push :
85 tags :
9- - ' v*.*.*'
10-
11- workflow_dispatch :
12- inputs :
13- tag :
14- description : ' Tag to publish (e.g. v1.2.3 or v1.2.3-rc.1)'
15- required : true
16- type : string
6+ - ' v*'
177
188permissions :
199 contents : read
20- id-token : write # required for OIDC-based publishing
10+ id-token : write
2111
2212jobs :
23- call-npm-release :
24- uses : postmanlabs/gh-security-scan-workflow/.github/workflows/security-npm-publish.yml@main
13+ publish :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v6
18+
19+ - name : Setup Node.js
20+ uses : actions/setup-node@v6
21+ with :
22+ node-version : ' 24'
23+ registry-url : ' https://registry.npmjs.org'
2524
26- with :
27- tag : ${{ github.ref_type == 'tag' && github.ref_name || inputs.tag }}
28- node_version : ' 22'
29- package_path : ' dist'
30- skip_tests : true
31- dry_run : ${{ github.event_name == 'workflow_dispatch' }}
25+ - name : Install dependencies
26+ run : npm ci
3227
33- secrets :
34- POSTMAN_NPM_TOKEN : ${{ secrets.POSTMAN_NPM_TOKEN }} # read-only granular token
28+ - name : Publish to npm
29+ if : github.ref_type == 'tag'
30+ run : npm publish --provenance --access public
31+ env :
32+ NODE_AUTH_TOKEN : ${{ secrets.POSTMAN_NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments