feat: publish a GitHub release in release step 4 and make it idempotent - #513
Merged
Conversation
04-release-complete.sh now turns the released Git tag into a GitHub release with `gh release create --verify-tag`, so it publishes the existing tag and never creates one. The generated notes link the release-note issue, the operator image (apache/doris:operator-<version>, with its docker pull command and Docker Hub page), and the formal source artifacts. The full run is now idempotent, so an interrupted release can be repeated: release files already present in release SVN are detected by name and packaging, signing, and the SVN commit are skipped; a release directory holding only some of the three files is reported as incomplete and stops the run for manual repair; a GitHub release whose notes already match is left untouched, and differing notes are replaced only after a confirmation. The new --github-only flag publishes or refreshes only the GitHub release. Vote and announcement drafts now start with a Subject line, so the mail title no longer has to be retyped. Co-Authored-By: Claude Opus 5 (1M context) <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 problem does this PR solve?
Issue Number: None
Related PR: #507
Problem Summary:
After a release vote passes,
04-release-complete.shonly uploaded the sourceartifacts to release SVN and wrote the announcement draft. The GitHub tag was
still left as a bare tag and had to be converted into a release by hand, and a
run that stopped halfway (SVN commit already done, mail draft not written)
could not simply be repeated: the script aborted with "SVN version directory
already exists".
This PR does three things:
Turn the released tag into a GitHub release. Once the release files are
in release SVN, the script writes
github-release-notes.mdunderWORK_DIR, prints it for review, and publishes it withgh release create --verify-tagafter a confirmation.--verify-tagmeansthe existing tag is published and no tag is ever created. The notes link:
RELEASE_NOTES_URL),apache/doris:operator-<version>(DOCKER_IMAGE),with its
docker pullcommand and Docker Hub page (DOCKER_IMAGE_URL),Make the whole run idempotent, so an interrupted release can just be
re-run:
packaging, signing, and the SVN commit are skipped (no GPG passphrase
prompt either);
incomplete and stops the run for manual repair;
differing notes are replaced only after an explicit confirmation;
--github-onlyflag publishes or refreshes only the GitHub release(mutually exclusive with
--mail-only).Add the mail subject to the drafts.
vote-email.txtandannounce-email.txtcarried the body only, so the title had to be retyped.Both now start with a
Subject:line followed by a blank line, and step 4prints the subject like step 3 already did.
New
release.enventries:GITHUB_REPO,DOCKER_IMAGE,DOCKER_IMAGE_URL(all validated;
DOCKER_IMAGEmust end with the currentVERSION, whichcatches a stale image tag after a version bump).
ghis a new prerequisite ofstep 4 and must be authenticated for
GITHUB_REPO.The version-specific defaults are moved on to the released
26.0.1, and thehardcoded version assertions in
tests/test-config.shnow derive fromVERSION, so they no longer need editing on every release.Release note
None
Check List (For Author)
Test
tools/release-tools/tests/run.shpasses. The suite uses temporary Gitrepositories and fake
gpg/svn/ghcommands; it touches no real keyring,remote repository, SVN repository, GitHub release, or mail system. New cases
cover: the GitHub release creation (including
--verify-tagand the notescontent), a repeated run of a finished release (no re-sign, no SVN commit, no
GitHub write), an incomplete release directory,
--github-only, the--mail-only/--github-onlyconflict, and theSubject:line of both maildrafts.
Behavior changed:
04-release-complete.shnow also publishes a GitHub release and requiresgh; repeating a finished run reports the completed steps and continuesinstead of failing; both mail drafts gained a leading
Subject:line.Does this need documentation?
tools/release-tools/README.mdis updated in this PR.Check List (For Reviewer who merge this PR)
🤖 Generated with Claude Code