File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 runs-on : ubuntu-latest
2727 permissions :
2828 contents : read
29- id-token : write
3029 steps :
3130 - name : Checkout
3231 uses : actions/checkout@v6
5756 echo "Would run: pnpm check"
5857 echo "Would run: pnpm build"
5958 echo "Would run: pnpm release:check"
60- bash scripts/openclaw-npm-publish.sh --dry-run
6159
6260 - name : Validate release tag and package metadata
6361 env :
@@ -111,6 +109,16 @@ jobs:
111109 contents : read
112110 id-token : write
113111 steps :
112+ - name : Validate tag input format
113+ env :
114+ RELEASE_TAG : ${{ inputs.tag }}
115+ run : |
116+ set -euo pipefail
117+ if [[ ! "${RELEASE_TAG}" =~ ^v[0-9]{4}\.[1-9][0-9]*\.[1-9][0-9]*(-beta\.[1-9][0-9]*)?$ ]]; then
118+ echo "Invalid release tag format: ${RELEASE_TAG}"
119+ exit 1
120+ fi
121+
114122 - name : Checkout
115123 uses : actions/checkout@v6
116124 with :
@@ -161,6 +169,4 @@ jobs:
161169 run : pnpm release:check
162170
163171 - name : Publish
164- env :
165- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
166172 run : bash scripts/openclaw-npm-publish.sh --publish
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ Historical note:
9494
9595- [ ] Confirm git status is clean; commit and push as needed.
9696- [ ] Confirm npm trusted publishing is configured for the ` openclaw ` package.
97+ - [ ] Do not rely on an ` NPM_TOKEN ` secret for this workflow; the publish job uses GitHub OIDC trusted publishing.
9798- [ ] Push the matching git tag to trigger the preview run in ` .github/workflows/openclaw-npm-release.yml ` .
9899- [ ] Run ` OpenClaw NPM Release ` manually with the same tag to publish after ` npm-release ` environment approval.
99100 - Stable tags publish to npm ` latest ` .
Original file line number Diff line number Diff line change 2020
2121echo " Resolved package version: ${package_version} "
2222echo " Resolved release channel: ${release_channel} "
23-
24- if [[ -n " ${NODE_AUTH_TOKEN:- } " ]]; then
25- if [[ " ${mode} " == " --dry-run" ]]; then
26- echo ' Would write npm auth config to $HOME/.npmrc using NODE_AUTH_TOKEN'
27- else
28- printf ' //registry.npmjs.org/:_authToken=%s\n' " ${NODE_AUTH_TOKEN} " > " ${HOME} /.npmrc"
29- fi
30- else
31- echo ' No NODE_AUTH_TOKEN set in this environment'
32- fi
23+ echo " Publish auth: GitHub OIDC trusted publishing"
3324
3425printf ' Publish command:'
3526printf ' %q' " ${publish_cmd[@]} "
You can’t perform that action at this time.
0 commit comments