Skip to content

ci: add release and publish workflows - #31

Merged
ChristopherPHolder merged 2 commits into
mainfrom
ci/release-workflows
Nov 18, 2026
Merged

ChristopherPHolder merged 2 commits into
mainfrom
ci/release-workflows

Conversation

@ChristopherPHolder

Copy link
Copy Markdown
Collaborator

Closes #30

Sets up releasing to npm following the PushBased publishing process.

Changes

  • nx.json: release tags are now v{version}, and nx release pushes the commit and tag and creates a GitHub Release from the project changelog.
  • release.yml (manual workflow_dispatch): authenticates as the PushBased Bot, runs nx release --skip-publish, then pushes the release commit and tag. There's an optional specifier input (patch/minor/major/exact version). If it's empty, the bump comes from conventional commits.
  • publish.yml (on v*.*.* tags): builds the package and runs nx release publish with OIDC trusted publishing, so no npm token is needed. It builds explicitly because nx-release-publish doesn't depend on build.

Both workflows are adapted from zod2nx-schema, using pnpm and Node 24 to match ci.yml.

Dry run

pnpm nx release --first-release --dry-run --skip-publish bumps 0.0.1 → 0.0.2, writes packages/lighthouse-soft-navigation/CHANGELOG.md, tags v0.0.2, pushes and creates the GitHub Release.

Before this works

  • Install the PushBased Bot GitHub App on the repo
  • Create a release environment: variable GH_APP_ID = 2781189, secret GH_APP_PRIVATE_KEY
  • First release by hand: pnpm nx release --first-release then pnpm nx release publish --first-release
  • Configure the npm trusted publisher: repo push-based/lighthouse-soft-navigation, workflow publish.yml, environment release

Release is triggered manually: it versions from conventional commits (or a
given specifier), writes the changelog, tags v{version}, pushes and creates
the GitHub Release as the PushBased Bot. The pushed tag triggers publish,
which builds and publishes to npm via trusted publishing.

Closes #30
release.git.push is now on, so releaseVersion in the e2e setup tried to push.
@ChristopherPHolder
ChristopherPHolder merged commit bd2f007 into main Nov 18, 2026
1 check passed
@ChristopherPHolder
ChristopherPHolder deleted the ci/release-workflows branch November 18, 2026 17:37
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.

Set up release and publish workflows

1 participant