Conversation
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| NEW_VERSION=$(npm version "$BUMP_TYPE" --no-git-tag-version) | ||
| git add -u # stages package.json and the lockfile, whichever the repo tracks | ||
| git commit -m "Bumped v${NEW_VERSION#v}" | ||
| echo "NEW_VERSION=${NEW_VERSION#v}" >> "$GITHUB_ENV" |
|
Added a Documented in the README, including the npm trusted publisher Environment field that can be pinned to the same name. |
|
Two questions came to mind:
|
There was a problem hiding this comment.
This should be its own workflow called reusable-release.yml.
The current release workflow is just for releasing new shared/reusable workflow versions.
The sync-semver-tags option is used with the nearform release action so when, for example, v7.0.1 is released, it then moves the v7 and v7.0 tags to the v7.0.1 release.
What
Replaces
.github/workflows/release.ymlwith a reusable (workflow_call) release workflow that fastify repositories can call to publish a new version.The workflow:
semverinput (patch|minor|major)Bumped vX.Y.Z--ignore-scriptsnpm run --if-present release:build--provenance(OIDC, noNPM_TOKENneeded)All actions are pinned by commit SHA, using the same
actions/checkoutandactions/setup-nodeversions already declared inplugins-ci.yml.Notes
persist-credentials: trueis required here (and commented as such) because the job pushes the release commit and tag.release.yml(theoptic-release-automation-actionpipeline used to release this repository itself) is removed by this PR. Releases offastify/workflowsneed to be handled separately.README.mddocuments the inputs, the required permissions and a ready-to-copy caller snippet.