Skip to content

Publish merged releases from default branch pushes. - #28

Merged
samuel-williams-shopify merged 2 commits into
mainfrom
publish-on-push
Sep 22, 2026
Merged

samuel-williams-shopify merged 2 commits into
mainfrom
publish-on-push

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

GitHub's upcoming default policy would block publishing through pull_request_target. Trigger release-publish.yaml on pushes to the configured default branch, pin inspection to the pushed SHA, and require exactly one merged PR whose repository, base branch, and merge commit match before publishing.

Only validated releases enter the publishing job's concurrency group, with queue: max to retain pending releases while later changes land. Environment approval, signing, attestations, and artifact recovery remain in place. The workflow no longer needs allow-unsafe-pr-checkout or a pull_request_target policy exception.

Updates the generated workflow, release notes, guides, and distributed agent context. Existing PR-number resolve calls remain compatible during migration. Consumers adopt the trigger with gem:github:setup:update; their RubyGems Trusted Publisher configuration stays the same. Each release must be the tip of its own push, as with a normal GitHub PR merge.

Validation:

  • 149 Sus tests passed (551 assertions); 523/523 library lines covered.
  • RuboCop: 43 files, no offenses. Decode: 32/32 public definitions documented.
  • New tests cover merge and squash releases, merged forks, later main commits, paginated associations, missing/ambiguous PRs, mismatched merge data, GitHub errors, and workflow output wiring.
  • Read-only resolution of the real v0.3.0 commit returned PR Release v0.3.0 #27 and regenerated its release content without a diff.
  • Workflow regeneration is idempotent; git diff --check passes.

GitHub references: push events, commit-to-PR lookup, queued concurrency.

Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
Signed-off-by: Samuel Williams <samuel.williams@shopify.com>
@samuel-williams-shopify
samuel-williams-shopify merged commit 6f1fb97 into main Sep 22, 2026
25 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the publish-on-push branch September 22, 2026 03:00
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