Repository navigation
ci: put the SPM semver tag on the swift-releases manifest commit - #3
Merged
Merged
Conversation
Swift Package Manager resolves semver tags only. The release workflow put the semver tag vX on the source commit on main, whose Package.swift has a placeholder checksum (v1.1.1 URL, all-zero checksum) and no generated Swift sources. The working manifest went to swift-releases under a non-semver swift-vX tag that SPM never resolves. So `from: "2.0.0"` could not resolve to a working package. Now the source commit is tagged source-vX, and vX goes on the swift-releases commit that holds the real URL, checksum and sources. The GitHub Release is created after that tag exists (--verify-tag). README: install instructions and a note for releases tagged before this fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BBxgR4mnF8VMVGa42idcxx
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 orde
2F96
r 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.
Problem
Swift Package Manager resolves semver tags only.
release.ymlput the semver tagvXon the source commit onmain. At that commit,Package.swiftstill has the placeholder binary target (thev1.1.1URL and an all-zero checksum), andSources/MinigrafKitholds only.gitkeep. The working manifest went to theswift-releasesbranch under aswift-vXtag, which SPM does not treat as a version.So
.package(url: …, from: "2.0.0")resolvesv2.0.1and gets a manifest that cannot work. The tagsv1.2.3,v2.0.0andv2.0.1all have this problem.Checked by hand:
swift-v2.0.1(b42ebae) points atreleases/download/v2.0.1/MinigrafKit-v2.0.1.xcframework.zip. That asset's SHA-256 is77522f0a…786ce, which matches the checksum in its manifest.Change
tagjob now tags the tested source commitsource-vX(not semver), and still fast-forwardsmain.build-and-publishchecks outsource-vX. It builds the xcframework, updatesPackage.swiftand the Swift sources onswift-releases, and then pushes the semver tagvXon that commit. IfvXalready exists on a different commit, it stops with an error.gh release create --verify-tag), so it attaches to the right tag.swift-vXtags are no longer created. The existing ones are left alone.Not in this PR: the existing
v2.0.1tagThe published
v2.0.1tag still points at the broken source commit (6e21977). Fixing it means moving the tag to b42ebae (swift-v2.0.1):This cannot break a working install, because the current tag cannot resolve. The GitHub Release
v2.0.1stays attached, since releases reference the tag by name. The README'sfrom: "2.0.1"works only after this is done. Movingv2.0.0andv1.2.3the same way is optional.Testing
release.ymlparses as YAML.🤖 Generated with Claude Code
https://claude.ai/code/session_01BBxgR4mnF8VMVGa42idcxx
Generated by Claude Code