Skip to content
Merged
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
19 changes: 16 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ on:

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write
# npm trusted publishing (OIDC): the release job mints a short-lived npm
# credential from the workflow's identity, so no NPM_TOKEN secret is needed.
# The trusted publisher registered on npmjs.com must name this repo and this
# workflow file (release.yml) or the publish fails with E403/E404.
id-token: write

jobs:
release:
name: Release
Expand All @@ -20,10 +29,12 @@ jobs:
# https://github.com/pnpm/pnpm/issues/8953
version: 9.15.3

- name: Use Node.js from nvmrc
# Node 24 (npm >= 11.5.1) for the publish: OIDC trusted publishing
# needs a newer npm than the .nvmrc toolchain (Node 22 / npm 10) ships.
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: 24.x
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
Expand All @@ -36,4 +47,6 @@ jobs:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Provenance attestation for the published tarball; requires the
# OIDC id-token permission above.
NPM_CONFIG_PROVENANCE: 'true'
Loading