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
24 changes: 14 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: Release (npm publish)

# Manual, deliberate trigger: publishing IS the launch (it also retires the
# TFJS 0.x line as `latest`). Run from the Actions tab once NPM_TOKEN is set.
# TFJS 0.x line as `latest`). Run from the Actions tab.
#
# Setup (one-time, repo admin):
# npmjs.com -> Access Tokens -> Generate granular token with read/write on
# the `denoiser` package -> add as repo secret NPM_TOKEN.
# Auth is npm trusted publishing (OIDC), no NPM_TOKEN secret. One-time setup
# by a `denoiser` package owner on npmjs.com:
# package -> Settings -> Trusted Publisher -> GitHub Actions
# Organization: pmndrs Repository: denoiser
# Workflow filename: release.yml Environment: (blank)
#
# Publishes with npm provenance (links the tarball to this workflow run),
# which needs `id-token: write` and node >= 20 / npm >= 9.5.
# Trusted publishing needs `id-token: write` and npm >= 11.5.1 (node 24 ships
# npm 11). Provenance is attached automatically.

on:
workflow_dispatch:
Expand All @@ -33,7 +35,7 @@ jobs:
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Install
Expand All @@ -46,8 +48,10 @@ jobs:
run: yarn workspace denoiser exec tsc --noEmit
- name: Show what will publish
run: cd packages/denoiser && npm pack --dry-run
# npm (not yarn) so setup-node's registry-url + NODE_AUTH_TOKEN apply.
# Ensure the npm CLI supports trusted publishing even if the runner's
# bundled npm drifts.
- name: npm >= 11.5.1
run: npm install -g npm@^11.5.1 && npm --version
# npm (not yarn): the OIDC token exchange is done by the npm CLI.
- name: Publish
run: cd packages/denoiser && npm publish --provenance --access public --tag "${{ inputs.tag }}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading