File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,24 @@ name: Publish
22permissions :
33 contents : read
44 packages : write
5+ id-token : write # Required for OIDC
56
67on :
78 release :
89 types : [created]
10+ workflow_dispatch :
11+ inputs :
12+ version :
13+ description : ' Version to publish (e.g., v1.2.3)'
14+ required : true
15+ type : string
916
1017jobs :
1118 publish-npm :
1219 runs-on : ubuntu-22.04
1320 steps :
1421 - uses : actions/checkout@v3
15- - uses : actions/setup-node@v3
22+ - uses : actions/setup-node@v4
1623 with :
1724 node-version : 20
1825 registry-url : https://registry.npmjs.org/
2128 - run : npm test
2229 - run : npm version ${TAG_NAME} --git-tag-version=false
2330 env :
24- TAG_NAME : ${{ github.event.release.tag_name }}
25- - run : npm whoami; npm --ignore-scripts publish
26- env :
27- NODE_AUTH_TOKEN : ${{secrets.npm_token}}
31+ TAG_NAME : ${{ github.event.release.tag_name || github.event.inputs.version }}
32+ - run : npm --ignore-scripts publish
You can’t perform that action at this time.
0 commit comments