Build Swift binary on release published, not created#28
Merged
Conversation
The `created` release event does not fire when a release is published from a previously-saved draft, so the binary build was silently skipped for draft-first releases (e.g. v0.12.0) while the PyPI publish (which listens on `published`) still ran. Switch to `published`, which fires for both draft-publish and direct-publish flows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the release-triggered Swift binary build workflow so it runs when a release is published, ensuring binaries are built/uploaded for both draft→publish and direct-publish release flows (preventing missing releases/latest/download/... assets).
Changes:
- Switch
.github/workflows/build-binary.ymltrigger fromrelease.types: [created]torelease.types: [published].
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Problem
build-binary.ymltriggers onrelease: [created]. GitHub does not fire thecreatedevent when a release is published from a previously-saved draft — it only fires for releases "published without previously being saved as a draft."As a result, the binary build was silently skipped for v0.12.0 (created as a draft, then published), while
publish.yml(which listens onpublished) still ran and pushed to PyPI. Theownscribe-audio-arm64asset was missing, soreleases/latest/download/...404'd for fresh installs.Fix
Switch the trigger to
published, which fires for both draft→publish and direct-publish flows. This makes the safer draft-first release ordering work correctly.Notes
workflow_dispatchso the binary can be rebuilt without a new release, and build anx86_64asset (the download URL supports it, but onlyarm64is ever published).