Skip to content

ci: release with release-please, pinning the image on the release PR - #16

Merged
robinbowes merged 1 commit into
mainfrom
ci/release-please
Nov 11, 2026
Merged

robinbowes merged 1 commit into
mainfrom
ci/release-please

Conversation

@robinbowes

Copy link
Copy Markdown

Replaces the tag-triggered publish-image.yml and commit-and-tag-version with release-please, following the setup used in record-action, unifi-mcp and the sync-lockfile repos. Design and alternatives are in decisions/2026-11-11-release-please-pins-image-on-release-pr.md.

.github/workflows/release.yml has three jobs:

  • release-please: App-token run (SEMANTIC_RELEASE_APP_*, scoped to this repo), node release type, so it bumps package.json and package-lock.json.
  • pin-image: while a release PR (autorelease: pending) is open, merges main into its branch via the update-branch API if needed, builds the image with an org.opencontainers.image.revision label, pushes it as :release-pr, and commits the digest to action.yml on the branch with createCommitOnBranch (signed, for required_signatures). It skips when the branch already contains main and ends in a pin commit.
  • publish: on release_created, fails unless the release commit changed action.yml and the pinned image's revision matches the release commit outside action.yml. It then tags the pinned digest X.Y.Z and X with docker buildx imagetools create (no rebuild), smoke tests it, and moves the git tag vX.

Config:

  • release-as: 7.0.0 forces the first release: everything since v6.3.1, including the Node 26 bump (build: run the action on node 26.13.0 #15, a build: commit), is a type release-please does not release. It has to be removed after v7.0.0 ships.
  • bootstrap-sha is v6.3.1's commit, since the repo has no GitHub Releases to anchor to.
  • build commits appear in the changelog as "Build System"; other types follow unifi-mcp.

Removed: publish-image.yml, .versionrc.json, .github/tasks/actionYamlUpdater.js (which threw on the digest pin), the changelog script, and the commit-and-tag-version and conventional-changelog-cli dev dependencies (139 lockfile entries, no other package versions changed). The ci.yml comment and .eslintrc.json ignore that referenced them are updated.

Checked locally: jactionlint --online, prek run, and on Node 26.13.0 npm ci, npm test (39 passing), npm run build, npm run lint. The digest sed/yq handling and the source-match git diff were run against test inputs. The workflow itself has not run yet; it first runs when this merges.

🤖 Generated with Claude Code

action.yml pins the image by digest, and a tag cannot carry the digest
of an image its own push builds, so publish-image.yml needed two tags
per release. The Release workflow now builds the image on the release
PR and commits its digest there (signed, via createCommitOnBranch).
Merging the PR creates vX.Y.Z; publish tags the pinned digest X.Y.Z and
X without rebuilding, smoke tests it, and moves the git tag vX.

pin-image runs on every push to main and merges main into the release
branch first, since release-please leaves its branch alone for
hidden-type commits such as dependency bumps. The image carries an
org.opencontainers.image.revision label, and publish refuses to tag
unless that commit matches the release commit outside action.yml.

release-as 7.0.0 forces the first release (the Node 26 bump is a
build: commit) and must be removed once v7.0.0 is out. bootstrap-sha
is v6.3.1, as the repo has no GitHub Releases for release-please to
anchor to.

Removes publish-image.yml and commit-and-tag-version with its
.versionrc.json and action.yml updater, which the digest pin had
already broken, and conventional-changelog-cli.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robinbowes
robinbowes merged commit bfc461d into main Nov 11, 2026
5 checks passed
@robinbowes
robinbowes deleted the ci/release-please branch November 11, 2026 16:19
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.

1 participant