Skip to content

Trigger push_gem from script/publish and allow manual dispatch - #2702

Merged
joelhawksley merged 1 commit into
mainfrom
joelhawksley-redesigned-sniffle
Aug 24, 2026
Merged

Trigger push_gem from script/publish and allow manual dispatch#2702
joelhawksley merged 1 commit into
mainfrom
joelhawksley-redesigned-sniffle

Conversation

@joelhawksley

Copy link
Copy Markdown
Member

Diagnosis of the "push_gem published v4.13.0, not v4.14.0" confusion:

  • The push_gem run for v4.13.0 was queued back on 2026-08-20 waiting on the release environment approval; it finally completed today (99h50m). That's the run you saw.
  • The v4.14.0 tag we pushed today did not trigger push_gem at all. RubyGems has no v4.14.0.

Root cause

GitHub Actions does not trigger downstream workflows for events driven by GITHUB_TOKEN. script/publish now runs inside the publish-release job, which uses GITHUB_TOKEN for its checkout, so git push origin v4.14.0 from that job does not fire the push: tags: v* event on push_gem.yml. Previous releases were tagged by a maintainer running script/publish locally with a PAT — that's why push_gem always fired historically.

Fix

Two changes:

  1. Add workflow_dispatch to push_gem.yml with a required tag input, and check that tag out (ref: inputs.tag). Lets a maintainer manually push the gem for a specific tag — needed right now to publish v4.14.0 to RubyGems.
  2. Dispatch push_gem.yml from script/publish after gh release create, passing the freshly created tag. || true so any dispatch failure never masks a successful release. Future releases will push the gem automatically even when script/publish runs from Actions.

Recovery for v4.14.0

Once this merges: Actions → Push GemRun workflow → tag: v4.14.0. That will check out the v4.14.0 tag and push the gem to RubyGems via Trusted Publishing (still gated on the release environment approval).

Publishing 4.14.0 tagged v4.14.0 and created the GitHub release, but
push_gem.yml did not run and no gem was pushed to RubyGems.

Root cause: GitHub Actions does not trigger downstream workflows for
events driven by GITHUB_TOKEN. script/publish now runs inside the
publish-release workflow, which uses GITHUB_TOKEN for its checkout —
so the 'git push origin v4.14.0' from that job does not fire the
'push: tags: v*' event on push_gem.yml. Previous releases were tagged
by a maintainer running script/publish locally with a PAT, which is
why push_gem always fired for them.

Two changes:

- Add a workflow_dispatch trigger to push_gem.yml with a required
  'tag' input, and check that tag out. This lets a maintainer manually
  push the gem for a specific tag (needed right now to publish v4.14.0
  to RubyGems).
- At the end of script/publish, dispatch push_gem.yml with the freshly
  created tag. || true so any dispatch failure never masks a successful
  release. This makes future releases push the gem automatically even
  when script/publish runs from Actions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 217f0a0d-a9f2-4607-9643-5fcb3e34f20f
@joelhawksley
joelhawksley merged commit d1fd891 into main Aug 24, 2026
22 of 24 checks passed
@joelhawksley
joelhawksley deleted the joelhawksley-redesigned-sniffle branch August 24, 2026 20:32
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