File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 required : false
1717 type : string
1818 default : ' 0'
19+ force-publish :
20+ description : ' Force publish without commit checks'
21+ required : false
22+ type : boolean
23+ default : false
1924 node-version :
2025 description : ' Node version to use (e.g., "20", "22", "24")'
2126 required : false
@@ -122,13 +127,23 @@ jobs:
122127
123128 - name : Publish with custom script (token-based)
124129 if : inputs.publish-script != '' && inputs.use-trusted-publishing == false
125- run : pnpm run ${{ inputs.publish-script }}
130+ run : |
131+ if [ "${{ inputs.force-publish }}" = "true" ]; then
132+ pnpm run ${{ inputs.publish-script }} -- --force-publish
133+ else
134+ pnpm run ${{ inputs.publish-script }}
135+ fi
126136 env :
127137 NODE_AUTH_TOKEN : ${{ secrets.npm_token }}
128138
129139 - name : Publish with custom script (trusted publishing)
130140 if : inputs.publish-script != '' && inputs.use-trusted-publishing == true
131- run : pnpm run ${{ inputs.publish-script }}
141+ run : |
142+ if [ "${{ inputs.force-publish }}" = "true" ]; then
143+ pnpm run ${{ inputs.publish-script }} -- --force-publish
144+ else
145+ pnpm run ${{ inputs.publish-script }}
146+ fi
132147
133148 - name : Publish package (token-based)
134149 if : inputs.publish-script == '' && inputs.package-name != '' && inputs.use-trusted-publishing == false
You can’t perform that action at this time.
0 commit comments