@@ -5,10 +5,6 @@ permissions:
55 id-token : write
66on :
77 workflow_call :
8- secrets :
9- NPM_TOKEN :
10- description : " NPM token"
11- required : true
128 inputs :
139 ref :
1410 description : " Commit ref for checkout"
2319 description : ' Semicolon-separated list of tags (e.g., "latest;rc"). First tag is primary.'
2420 required : true
2521 type : string
26- workflow_dispatch :
27- inputs :
28- ref :
29- description : " Commit ref for checkout"
30- required : false
31- type : string
32- default : " "
33- package_version :
34- description : " The version to publish (e.g. v1.0.0)"
35- required : true
36- type : string
37- package_tag :
38- description : ' Semicolon-separated list of tags (e.g., "latest;rc"). First tag is primary.'
39- required : true
40- type : string
41- continue_on_error :
42- description : " Continue workflow even if publish fails (default: false)"
43- required : true
44- type : boolean
45- default : false
4622jobs :
4723 publish :
48- env :
49- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
5024 runs-on : ubuntu-latest
5125 steps :
5226 - uses : actions/checkout@v4
6539
6640 - uses : actions/setup-node@v4
6741 with :
68- node-version : " 20 "
42+ node-version : " 22.x "
6943 registry-url : " https://registry.npmjs.org"
7044
45+ - name : Install latest npm
46+ run : npm install -g npm@latest
47+
7148 - name : Install dependencies
7249 working-directory : solidity
7350 run : npm install
@@ -122,17 +99,16 @@ jobs:
12299 } >> $GITHUB_OUTPUT
123100
124101 - name : Publish to npm with primary tag
125- continue-on-error : ${{ github.event_name == 'workflow_call' || inputs.continue_on_error != false }}
126102 working-directory : solidity
127103 shell : bash
128104 run : |
129105 set -e
130106 npm publish --provenance --access public --tag ${{ steps.parse_tags.outputs.primary_tag }}
131- env :
132- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
133107
134108 - name : Add additional dist-tags
135109 if : steps.parse_tags.outputs.additional_tags != ''
110+ # allowing this step to fail until https://github.com/npm/cli/issues/8547 is resolved
111+ continue-on-error : true
136112 working-directory : solidity
137113 shell : bash
138114 run : |
@@ -150,5 +126,3 @@ jobs:
150126 npm dist-tag add "$PACKAGE_SPEC" "$tag"
151127 fi
152128 done <<< "${{ steps.parse_tags.outputs.additional_tags }}"
153- env :
154- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments