ci: automate releases with release-please#71
Merged
Merged
Conversation
Wire googleapis/release-please into the repo. On push to main it maintains a "chore: release X.Y.Z" PR (version bump in version.txt + CHANGELOG.md regenerated from Conventional Commits); merging that PR creates the vX.Y.Z tag and a GitHub Release whose body is the changelog. That tag triggers the existing build-and-release.yml, which now ATTACHES its signed assets to that Release (append_body: true) instead of creating a release and overwriting the changelog. release-please tags via secrets.RELEASE_PLEASE_TOKEN (a PAT / GitHub App token): a tag pushed with the default GITHUB_TOKEN does not trigger other workflows, so build-and-release.yml would never fire and the Release would ship with no assets. - add release-please.yml, release-please-config.json (release-type: simple, vX.Y.Z tags), .release-please-manifest.json seeded at 1.0.0, version.txt - build-and-release.yml: release job appends assets, no longer clobbers the release-please changelog (drop generate_release_notes / name) - docs/DEVELOPMENT.md: rewrite Releases section, document RELEASE_PLEASE_TOKEN Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address review of #71: - release-please.yml: the RELEASE_PLEASE_TOKEN setup comment pointed at a nonexistent README "Releases" section; point it at the real docs in docs/DEVELOPMENT.md ("Releases" / "Required secret: RELEASE_PLEASE_TOKEN"). - docs/DEVELOPMENT.md: CHANGELOG.md does not exist until the first release PR merges, so drop the dead ../CHANGELOG.md relative link (keep a plain code span, note it's created by the first release PR). - build-and-release.yml: clarify the append_body non-idempotency caveat — it re-appends on the Actions "Re-run jobs" path, and a failed signing/build re-run never reaches the attach step. No behaviour change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Integrates release-please so releases are cut from Conventional Commits instead of hand-pushed tags.
How it works after merge
main(feat:→ minor,fix:→ patch,feat!:/BREAKING CHANGE:→ major).version.txt, regeneratesCHANGELOG.md).vX.Y.Ztag + a GitHub Release (changelog as the body).build-and-release.yml, which attaches the signed DLL/installer to that Release — it no longer creates/overwrites the release (append_body: true, droppedgenerate_release_notes/name).The first release PR will propose 1.1.0 (two
feat:commits sincev1.0.0; thexrprof:commit isn't a recognised type, so it's ignored).build-and-release.ymlstill builds Release/Debug on every push tomainand every PR as a verification gate (unsigned, no Release) — unchanged.RELEASE_PLEASE_TOKENsecretA tag created with the default
GITHUB_TOKENdoes not trigger other workflows (GitHub anti-recursion), sobuild-and-release.ymlwould never run and the Release would have no assets. Add aRELEASE_PLEASE_TOKENrepo secret (Settings → Secrets and variables → Actions → New repository secret):reposcopecontents: write+pull_requests: write(no expiry)Because we use a PAT, the "Allow GitHub Actions to create and approve pull requests" toggle is not needed. If the secret is missing/under-scoped the release-please job fails fast with a 403 — never a silent asset-less release.
Files
.github/workflows/release-please.yml,release-please-config.json(release-type: simple,vX.Y.Ztags),.release-please-manifest.json(seeded1.0.0),version.txt.github/workflows/build-and-release.yml— release job appends assets, no longer clobbers the changelogdocs/DEVELOPMENT.md—Releasessection rewritten,RELEASE_PLEASE_TOKENdocumented🤖 Generated with Claude Code