ci: add workflow_dispatch trigger to publish workflow#354
Merged
vanceingalls merged 1 commit intomainfrom Apr 20, 2026
Merged
Conversation
miguel-heygen
approved these changes
Apr 20, 2026
jrusso1020
approved these changes
Apr 20, 2026
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.
What
Add a workflow_dispatch trigger with a version input to .github/workflows/publish.yml so the publish workflow can be re-run manually for a given tag.
Why
v0.4.11 was pushed to origin with the same git push origin main --tags that pushed main, but GitHub never delivered a push event for the tag ref. Result: the tag exists at acce912, the package was never published, and recovery required tag surgery (git push origin :refs/tags/v0.4.11 && git push origin v0.4.11).
This is a rare but documented webhook coalescing issue. Adding a manual trigger gives us a one-click recovery path so the next occurrence doesn't need to delete and re-push tags.
How
• Adds workflow_dispatch.inputs.version (required string) — describes the format and notes the tag must already exist.
• Extends the job-level if to allow github.event_name == 'workflow_dispatch' alongside the existing push and merged-PR conditions.
• actions/checkout@v4 now sets ref: refs/tags/v on dispatch so we publish the exact commit that was tagged, not whatever is currently on main. Push and pull_request continue to use github.ref (no behavior change).
• Resolve version reads from inputs.version on dispatch (strips an optional leading v for forgiving input).
• Create release tag is intentionally not extended to dispatch — the dispatch path assumes the tag already exists (that's the whole reason you're using it).
• Per-package npm view and gh release view idempotency guards already exist, so a partially-completed publish or re-run on an already-released version is safe — published packages are skipped, the GitHub Release isn't recreated.
Test plan
How was this tested?