Commit be290d3
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 provenance1 parent 130ddb3 commit be290d3
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 101 | | |
105 | 102 | | |
106 | 103 | | |
| |||
0 commit comments