ci: create verified release commits with the GitHub App - #2671
Merged
DariuszPorowski merged 1 commit intoSep 24, 2026
Merged
Conversation
release-samples.sh pushed a local commit, so the first commit on each release branch was unsigned: the App token authenticated the push but did not sign the commit. Create the commit through the Git database API with the App token instead, which GitHub signs for bots, and publish the release branch only after GitHub reports the commit as verified. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
sk593
approved these changes
Sep 24, 2026
willdavsmith
approved these changes
Sep 24, 2026
DariuszPorowski
deleted the
dariuszporowski-release-bot-signature-check
branch
September 24, 2026 17:32
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
The release workflow now creates the first commit on a new release branch (
Update samples for vX.Y) through the GitHub Git database API with theradius-releaseApp token. GitHub signs commits created this way, so the commit is Verified. The script confirms that verification before it creates or fast-forwards the release branch, and it still publishes the branch with a single ref update, so push-triggered workflows run once on it, as before.Reason for change
release-samples.shcommitted locally and rangit push. The App token authenticated the push, but nothing signed the commit:--signoffonly adds the DCO trailer. GitHub reports the v0.60 release commit01643e2asunsigned.A new
vX.Ybranch is only covered by thev[0-9].[0-9][0-9]ruleset, which doesn't require signatures; theedgeruleset's signature rule applies once the workflow makes the branch the default. The unsigned commit then appeared in the upmerge PR #2669, and that PR's commits were rewritten with a maintainer's signature before it merged.GitHub signs commits that a GitHub App creates through the API when the request has no custom author, committer, or signature (Signature verification for bots).
peter-evans/create-pull-requestuses the same blobs, tree, and commit flow forsign-commits: true.upmerge.yamlstill creates local commits (Upmerge to edge,Preserve edge-specific configuration); this PR doesn't change it.How to test
The workflow only runs on
workflow_dispatchand changes the default branch, so it wasn't run end to end. Instead:ghthat implements the blobs, trees, commits, and refs endpoints with git plumbing. All 43 checks passed, covering a new branch, fast-forwarding an existing branch, rejecting a diverged branch, not publishing an unverified commit, stopping on a tree mismatch, deletions, file modes, symlinks, paths with spaces, missing variables, no changes, and API failures. Six deliberate regressions to the script were each caught. The stub isn't part of this PR.actionlint,bash -n, andgit diff --checkpass.shellcheckreports only the existing SC2086 note onecho $VERSION_NUMBER.gh api .../git/ref/heads/<branch> --silent) against this repository: exit 0 forv0.60and 1 for a missing branch.On the next release, the first commit on the new
vX.Ybranch should show Verified, authored byradius-release[bot]and committed byGitHub. If GitHub doesn't verify it, the job fails before any branch is created.File change summary
.github/scripts/release-samples.shgit commitandgit pushwith Git database API calls (blobs, tree, commit, then ref) usingGH_TOKEN. Keeps the DCO sign-off in the message, checks that the remote tree matches the staged changes, fails before publishing if the commit isn't verified, and only fast-forwards an existing release branch, asgit pushdid. Addspipefail..github/workflows/release.yamlConfigure gitstep, and stops persisting checkout credentials because the job no longer pushes with git.