Skip to content

Commit be290d3

Browse files
authored
fix(ci): upgrade Node to 24 for npm trusted publishing support (#408)
## Summary - Fixes the npm publish failure in the release workflow ([failed run](https://github.com/caffeinelabs/mops/actions/runs/23237156886/job/67543843958)) - **Root cause**: npm trusted publishing (OIDC) [requires npm CLI 11.5.1+](https://docs.npmjs.com/trusted-publishers#supported-cicd-providers), but the workflow was installing `npm@11.4.0` — one patch version too old - **Fix**: Upgrade `node-version` from 22 to 24 (ships with npm 11.5.1+ natively), removing the manual npm upgrade step ## Changes | What | Before | After | |---|---|---| | `node-version` | `22` + manual `npm install -g npm@11.4.0` | `24` (bundles npm 11.5.1+) | | npm upgrade step | present | removed (unnecessary) | | `runs-on` | `ubuntu-22.04` | `ubuntu-24.04` | | `actions/checkout` | `v5.0.0` | `v6.0.2` | | `actions/setup-node` | `v4.4.0` | `v6.3.0` | `docker/setup-docker-action` intentionally left at v4.5.0 for consistency with other workflows — will be updated in a follow-up PR along with all other workflow files. ## Test plan - [ ] Confirm npm trusted publishing is configured on npmjs.com for `ic-mops` (Settings → Trusted Publisher → GitHub Actions, workflow: `release.yml`, repo: `caffeinelabs/mops`) - [ ] Re-release v2.3.2 by deleting and re-creating the tag on the new main HEAD: ```bash git tag -d cli-v2.3.2 git push origin :refs/tags/cli-v2.3.2 git checkout main && git pull git tag cli-v2.3.2 git push origin cli-v2.3.2 ``` - [ ] Verify the workflow passes and the package is published to npm with provenance
1 parent 130ddb3 commit be290d3

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ concurrency:
1515

1616
jobs:
1717
release:
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919
timeout-minutes: 30
2020
steps:
21-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2222
with:
2323
fetch-depth: 0
2424

@@ -93,14 +93,11 @@ jobs:
9393
# --- npm publish ---
9494

9595
- name: Set up Node.js
96-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
96+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
9797
with:
98-
node-version: 22
98+
node-version: 24
9999
registry-url: "https://registry.npmjs.org"
100100

101-
- name: Upgrade npm for trusted publishing
102-
run: npm install -g npm@11.4.0
103-
104101
- uses: ./.github/actions/cache-rust-wasm
105102

106103
- name: Install dependencies

0 commit comments

Comments
 (0)