Repository navigation
ci: add release and publish workflows - #31
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #30
Sets up releasing to npm following the PushBased publishing process.
Changes
nx.json: release tags are nowv{version}, and nx release pushes the commit and tag and creates a GitHub Release from the project changelog.release.yml(manualworkflow_dispatch): authenticates as the PushBased Bot, runsnx release --skip-publish, then pushes the release commit and tag. There's an optionalspecifierinput (patch/minor/major/exact version). If it's empty, the bump comes from conventional commits.publish.yml(onv*.*.*tags): builds the package and runsnx release publishwith OIDC trusted publishing, so no npm token is needed. It builds explicitly becausenx-release-publishdoesn't depend onbuild.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-publishbumps 0.0.1 → 0.0.2, writespackages/lighthouse-soft-navigation/CHANGELOG.md, tagsv0.0.2, pushes and creates the GitHub Release.Before this works
releaseenvironment: variableGH_APP_ID=2781189, secretGH_APP_PRIVATE_KEYpnpm nx release --first-releasethenpnpm nx release publish --first-releasepush-based/lighthouse-soft-navigation, workflowpublish.yml, environmentrelease