Repository navigation
ci: add release workflow based on optic-release-automation-action - #4
Merged
Merged
Conversation
Adds a maintainer-gated release pipeline that uses nearform-actions/optic-release-automation-action. The workflow: - triggers manually via workflow_dispatch (patch/minor/major) or on pull_request: closed for the publish step - is gated by the 'production' GitHub environment so only the maintainer can run it - delegates the version bump to the existing standard-version 'release' script (preserves CHANGELOG.md generation) - publishes to npm via Trusted Publishing (oidc, no NPM_TOKEN) - notifies issues referenced via 'Fixes #N' in the release PR The maintainer must configure the 'production' environment (required reviewers) and the npm Trusted Publisher before the first run.
This branch was previously deployed
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.
Summary
Adds a maintainer-gated release pipeline using
nearform-actions/optic-release-automation-action
(modelled on the workflow used by
nearform/fastify-mssql).
What it does
workflow_dispatch(semver choice: patch / minor / major) and onpull_request: closedfor the publish step.standard-versionreleasescript viabump-command, soCHANGELOG.mdgeneration is preserved.publish-mode: oidc, noNPM_TOKENsecret required).Fixes #Nin the included PRs (notify-linked-issues: 'true').Maintainer-only enforcement
productionGitHub environment, which must be configured (one time) with the maintainer as a required reviewer in Settings → Environments → production. This is the only gate that prevents non-maintainers from running the release.https://www.npmjs.com/package/@thecodepace/fastify-http-query/access: GitHub Actions, repoTheCodePace/fastify-http-query, workflowrelease.yml, environmentproduction.If Trusted Publishing is not desired, the maintainer can switch
publish-modetotokenand add anNPM_TOKENsecret instead.Files changed
.github/workflows/release.yml(new) — 33 linesVerification
productionenvironment and the npm Trusted Publisher.patch. The action pushes arelease/v*branch and opens a PR with thepackage.jsonbump andCHANGELOG.mdupdate.Checklist
productionenvironment with the maintainer as required reviewerNPM_TOKEN+ switch topublish-mode: token)npm run release:firstlocally, or let the action handle the0.0.0→0.0.1bump