Inline the release-tag step - #51
Merged
Merged
Conversation
touchlab/ga-update-release-tag declares the Node 20 runtime, which leaves the runners in September. It has no newer tag, no fork, and its last commit was in 2024, so there is nothing to upgrade to. It ran six git commands; those are now in the workflow. Two changes while inlining. `git add .` becomes `git add -f Package.swift`: the blanket add would commit anything else the build left in the tree, and it skipped the manifest entirely when the path was ignored, which is what produced a 0.3.0 release with no manifest. And the commit now has an explicit bot identity rather than whatever the runner happened to be called. The throwaway build-<version> branch is kept — it is what keeps the generated manifest on the tag and off the default branch.
karolb-proexe
approved these changes
Aug 10, 2026
An unchanged manifest leaves nothing staged, and git commit exits non-zero on that. Under set -e the job would stop there — after the release already exists — leaving the tag on a commit without the manifest, which is the state that made 0.3.0 unusable. The generated file also gets checked with -s rather than -f, so a zero-byte manifest from a partial failure can't pass as valid.
Placed before the release is created, so it fails while nothing has been produced yet. Once the release exists, a failure further down leaves the release, the tag and possibly the Maven artifacts behind — and those cannot all be cleanly withdrawn, so republishing the same version is not a recovery path. The message says what to do instead. This is what 0.3.0 needed: it failed after publishing, and the fix was 0.3.1 rather than any attempt to reuse the version.
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.
Description ✏️
touchlab/ga-update-release-tagdeclares the Node 20 runtime, which GitHub removes from the runners in September. There is no newer tag, no fork, and its last commit was in 2024 — nothing to upgrade to. It ran six git commands, so those are now in the workflow directly.Two deliberate changes while inlining:
git add .→git add -f Package.swift. The blanket add would commit anything else the build left in the working tree, and it skipped the manifest entirely when that path was ignored — which is exactly how0.3.0ended up published with no manifest.The throwaway
build-<version>branch is kept. It is never pushed, and it is what keeps the generated manifest on the tag rather than onmain.Screenshots / Recordings 📷
How to Test 🐛
The step only runs during publish. The sequence was verified locally against a scratch repository, including the case where
Package.swiftis gitignored: the tag ends up pointing at the manifest commit, the manifest is present on the tag, and the default branch is untouched.References 🔗