8000 ci: put the SPM semver tag on the swift-releases manifest commit by adityamukho · Pull Request #3 · project-minigraf/minigraf-swift · GitHub
[go: up one dir, main page]

Skip to content

ci: put the SPM semver tag on the swift-releases manifest commit - #3

Merged
adityamukho merged 1 commit into
mainfrom
claude/magical-wright-lbxulz
Sep 26, 2026
Merged

adityamukho merged 1 commit into
mainfrom
claude/magical-wright-lbxulz

Conversation

@adityamukho
Copy link
Copy Markdown
Contributor

Problem

Swift Package Manager resolves semver tags only. release.yml put the semver tag vX on the source commit on main. At that commit, Package.swift still has the placeholder binary target (the v1.1.1 URL and an all-zero checksum), and Sources/MinigrafKit holds only .gitkeep. The working manifest went to the swift-releases branch under a swift-vX tag, which SPM does not treat as a version.

So .package(url: …, from: "2.0.0") resolves v2.0.1 and gets a manifest that cannot work. The tags v1.2.3, v2.0.0 and v2.0.1 all have this problem.

Checked by hand: swift-v2.0.1 (b42ebae) points at releases/download/v2.0.1/MinigrafKit-v2.0.1.xcframework.zip. That asset's SHA-256 is 77522f0a…786ce, which matches the checksum in its manifest.

Change

  • The tag job now tags the tested source commit source-vX (not semver), and still fast-forwards main.
  • build-and-publish checks out source-vX. It builds the xcframework, updates Package.swift and the Swift sources on swift-releases, and then pushes the semver tag vX on that commit. If vX already exists on a different commit, it stops with an error.
  • The GitHub Release is created after the tag exists (gh release create --verify-tag), so it attaches to the right tag.
  • The swift-vX tags are no longer created. The existing ones are left alone.
  • README: the install steps use the real tag layout, with a note for releases tagged before this fix.

Not in this PR: the existing v2.0.1 tag

The published v2.0.1 tag still points at the broken source commit (6e21977). Fixing it means moving the tag to b42ebae (swift-v2.0.1):

git fetch origin --tags
git tag -f v2.0.1 swift-v2.0.1
git push -f origin refs/tags/v2.0.1

This cannot break a working install, because the current tag cannot resolve. The GitHub Release v2.0.1 stays attached, since releases reference the tag by name. The README's from: "2.0.1" works only after this is done. Moving v2.0.0 and v1.2.3 the same way is optional.

Testing

  • release.yml parses as YAML.
  • I could not run the workflow end to end from here, because it needs a macOS runner, the release token and a core release. The next core release (v2.0.2) will be the first real run, so please watch that run's tag step.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BBxgR4mnF8VMVGa42idcxx


Generated by Claude Code

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
@adityamukho
adityamukho merged commit 9a6579c into main Sep 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0