Skip to content

Create GH release automatically from a release tag push - #84

Open
Kyle-Ye wants to merge 1 commit into
jcmosc:mainfrom
OpenSwiftUIProject:feature/automate-release
Open

Kyle-Ye wants to merge 1 commit into
jcmosc:mainfrom
OpenSwiftUIProject:feature/automate-release

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Releases are created by hand after the release workflow builds the XCFramework, and the checksum has to be computed separately.

After the build, create the GitHub release for the pushed tag and upload Compute.xcframework.zip. The release notes start with the notes that GitHub generates from the changes since the previous release, followed by a binaryTarget snippet with the download URL and SwiftPM checksum. Tags that contain a hyphen create a prerelease. If the release already exists, a rerun replaces the asset and the notes.

Validation

  • actionlint passes.
  • The notes step produced the expected changelog link, download URL, and checksum for an existing tag in a fork.

After the XCFramework build, create the release for the pushed tag and
upload Compute.xcframework.zip to it. The release notes start with the
notes that GitHub generates from the changes since the previous release,
followed by a binaryTarget snippet with the download URL and SwiftPM
checksum. Tags that contain a hyphen create a prerelease. A rerun for an
existing release replaces the asset and the notes.
@Kyle-Ye Kyle-Ye changed the title Create the GitHub release from the release workflow Create GH release automatically from a release tag push Oct 17, 2026
@Kyle-Ye

Kyle-Ye commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Here is how I understand the current release process, and what this workflow changes.

Current process

  1. Merge fixes into main through pull requests.
  2. Cherry-pick the fixes into the release branch, for example release/0.6.
  3. Commit "Update bundle version to 0.6.x" to bump MARKETING_VERSION in Xcode/Configs/Compute.xcconfig.
  4. Push the 0.6.x tag. The Release workflow builds Compute.xcframework.zip and uploads it as an Actions artifact.
  5. Wait for the run, then download the artifact from the run page.
  6. Create the GitHub release by hand: set the title, write the notes, and upload the zip.
  7. Consumers download the zip and run swift package compute-checksum themselves before they can pin a binaryTarget.
  8. Merge the release branch back into main from time to time.

With this workflow

Steps 1–4 and 8 stay the same. The workflow replaces steps 5–7:

  • It creates the release Version 0.6.x for the pushed tag and uploads Compute.xcframework.zip to it.
  • The notes start with GitHub's generated notes since the previous release, followed by a binaryTarget snippet with the download URL and checksum, so consumers can copy it directly.
  • Tags that contain a hyphen, such as 0.6.4-bugfix.1, create a prerelease.
  • You can still edit the notes after the run to add the highlights you usually write.

Example from our fork: https://github.com/OpenSwiftUIProject/Compute/releases/tag/0.6.4-bugfix.1

Possible follow-ups (not in this PR)

  • Pass the tag as MARKETING_VERSION to create-xcframework.sh, so the binary no longer depends on a separate version commit. This only works for tags that are valid bundle versions.
  • Fixes reach the release branch as cherry-picks, so the generated notes can contain only the "Full Changelog" link. A .github/release.yml that groups notes by label, or creating the release as a draft to review the notes before publishing, would help.

Happy to adjust any of this to fit how you prefer to cut releases.

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.

1 participant