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
35 changes: 30 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Release

# Release gate: run the heavy package smoke test BEFORE any release. It packs,
# installs the tarball, scaffolds Node and Express apps, boots their servers and
# verifies a live HTTP response. This is intentionally kept out of the per-PR
# ci.yml job. No registry publish credentials are configured here; the workflow
# only proves the published package works end to end.
# Release pipeline:
# 1) smoke: pack, install the tarball, scaffold Node and Express apps, boot their
# servers and verify a live HTTP response. Kept out of the per-PR ci.yml job.
# 2) publish: on a version tag, publish to npm using OIDC trusted publishing
# (no long-lived token; provenance is attached automatically).
on:
push:
tags:
Expand All @@ -28,3 +28,28 @@ jobs:

- name: Run package smoke test
run: npm run test:package

publish:
needs: smoke
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

# Trusted publishing (OIDC) requires npm >= 11.5.1.
- name: Upgrade npm
run: npm install -g npm@latest

- name: Publish to npm
run: npm publish
Loading