Skip to content

ci: add release workflow (npm trusted publishing + GitHub Release)#6

Merged
ooswald merged 1 commit into
mainfrom
add-release-workflow
May 11, 2026
Merged

ci: add release workflow (npm trusted publishing + GitHub Release)#6
ooswald merged 1 commit into
mainfrom
add-release-workflow

Conversation

@ooswald
Copy link
Copy Markdown
Owner

@ooswald ooswald commented May 11, 2026

What

Adds .github/workflows/release.yml that triggers on any v* tag push and:

  1. Runs npm ci, build, tests
  2. npm publish --provenance --access=public via OIDC trusted publishing — no token in CI
  3. Creates a GitHub Release at the tag with auto-generated notes (softprops/action-gh-release@v2)

Required follow-up (one-time setup)

Configure npm Trusted Publishing for the package:

Until that's done, the publish step on this workflow will fail with an OIDC error. The rest (build + test) still runs, so this is safe to merge.

How releases work after this

npm version minor              # bumps package.json + creates the v0.X.0 tag locally
git push origin main
git push origin v0.X.0         # this push triggers the workflow

No more browser passkey prompts; no npm token in any secret. The OIDC trust is scoped to this repo + this workflow file.

Triggers on push of any v*-tag. Runs build + tests, then:
- npm publish --provenance --access=public (via OIDC, no secret token)
- Creates a GitHub Release at the tag with auto-generated notes

Requires npm Trusted Publishing to be configured separately at
https://www.npmjs.com/package/flappie-api/access (one-time setup,
linked to ooswald/flappie-api + workflow file release.yml).
Until that's done the publish step fails - the rest still runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ooswald ooswald merged commit 4937231 into main May 11, 2026
1 check passed
@ooswald ooswald deleted the add-release-workflow branch May 11, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant