Skip to content

release

release #3

Workflow file for this run

name: release
# Publishes the current commit's version to npm via Trusted Publishing (OIDC):
# configure npmjs.com → package millionsend → Settings → Trusted Publisher →
# GitHub Actions, repo MillionSend/millionsend-node, workflow release.yml.
# No token or OTP is stored anywhere.
on:
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # OIDC for npm Trusted Publishing
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: pnpm/action-setup@f40ffcd9367d9f12939873eb1018b921a783ffaa # v4
with:
version: 9
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck && pnpm test
# npm ≥ 11.5.1 exchanges the OIDC token itself; publish runs prepack (build).
- run: npm install -g npm@11.8.0
- run: npm publish