[DEV] remove git-release-test.yml - #305
Merged
Merged
Conversation
The workflow is a copy of git-release-pre.yml which differs only in its name, in the branch it is triggered by and in an additional step echoing github.ref_name. A copy of the workflow it is supposed to test can drift from it, and it did: DRAFT_RELEASE was removed from both workflows with #178 but got added again on the git-release branch two days later. Because that branch is never merged, the flag stayed there unnoticed and every run left another draft release behind on tag "latest". The release workflow can be tested without a copy by pushing a branch matching "release-*", which runs git-release-pre.yml itself. Co-Authored-By: Claude Opus 5 <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.
This PR…
.github/workflows/git-release-test.yml.Considerations and implementations
The workflow is a copy of
git-release-pre.yml. Ondevelopthe two differ in three things only:Everything else — checkout,
copyFilesToDist.sh, the release step and its whole configuration — is identical.Why remove it rather than keep it
A copy of the workflow it is meant to test can drift from that workflow, and this one did.
DRAFT_RELEASE: truewas removed from both workflows with #178 in February 2023:Two days later it was added again — but only on the
git-releasebranch, in one of thetest/test 2/test 3/test 4commits. That branch is never merged anywhere, so the flag was invisible fromdevelopand stayed there for three and a half years.The consequence is the bug #178 already described.
UNRELEASED: updatedeletes and recreates the previous release by its tag, and a draft release has no tag — so the previous draft could never be found and replaced, and every run left another one behind. Four such drafts had accumulated on taglatestand have been deleted.Testing a workflow with a copy that can silently diverge from it gives less confidence than not testing it at all.
How to test the release workflow without this file
Push a branch whose name matches
release-*, for examplerelease-test. That triggersgit-release-pre.ymlitself, so what is exercised is the real workflow rather than a duplicate of it.The only thing lost is the
Check outputstep, which echoesgithub.ref_name— that value is visible in the run context anyway.Not addressed here
git-release-pre.ymlandgit-release.ymlboth write to thelatesttag. SettingUNRELEASED_TAGwould let test runs use a tag of their own instead of replacing the current pre-release.docker://antonyurchenko/git-release:latestis unpinned. It currently resolves tov6.0.0and has not moved since January 2024, but upstream recommends locking to a major version such as:v6.git-releasebranch itself has no content of its own any more and can be removed. It can be recreated withgit push origin develop:git-releasewhenever it is needed.Pull Request Checklist
🤖 Generated with Claude Code