Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: "22"
# Node 22+ and npm 11.5.1+ required for Trusted Publishing (OIDC). Node 24 ships a recent toolchain.
node-version: "24"
registry-url: https://registry.npmjs.org
cache: npm

# Trusted publishing requires npm CLI >= 11.5.1 (see npm trusted-publishers docs).
# Do not use `npm install -g npm@...` here: it can leave the runner with a broken global npm (e.g. MODULE_NOT_FOUND: promise-retry).
# Activate a pinned npm 11.x via Corepack instead (meets npm >= 11.5.1 for OIDC).
- name: Ensure npm for OIDC
run: npm install -g npm@^11.5.1
run: |
corepack enable
corepack prepare npm@11.6.3 --activate
npm --version

- name: Verify VERSION matches tag
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/OSS_PUBLIC_REPO_SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ After changing `VERSION`, commit, then sync, then rebuild and run checks before
## CI and publish (GitHub Actions)

- **CI** (`.github/workflows/ci.yml`): on every PR and push to `main` - `npm ci`, `npm run build`, `npm run engine:validate`.
- **Release** (`.github/workflows/release.yml`): on push of tag `v*` (e.g. `v0.2.0`). The `VERSION` file must equal the tag without the `v` prefix (`0.2.0`). After bumping `VERSION`, run `npm run sync-versions`, commit, merge, then create and push the tag on that commit.
- **Release** (`.github/workflows/release.yml`): on push of tag `v*` (e.g. `v0.2.0`). The `VERSION` file must equal the tag without the `v` prefix (`0.2.0`). After bumping `VERSION`, run `npm run sync-versions`, commit, merge, then create and push the tag on that commit. The workflow uses **Node 24** and **Corepack** to activate **npm 11.5.1+** (Trusted Publishing / OIDC); it avoids `npm install -g npm`, which can break on GitHub-hosted runners.
- **npm:** publishing uses **Trusted Publishing** (OIDC) from this workflow file - no long-lived `NPM_TOKEN` in GitHub. Each `@kiploks/engine-*` package on npmjs.com must list this workflow under Trusted Publisher (filename must match: `release.yml`).
- Optional: create a **GitHub Release** from the tag for notes; it does not affect npm publish.
Loading