ci: add publish-on-release workflow for release-please recovery#55
Merged
lukeocodes merged 1 commit intomainfrom May 4, 2026
Merged
ci: add publish-on-release workflow for release-please recovery#55lukeocodes merged 1 commit intomainfrom
lukeocodes merged 1 commit intomainfrom
Conversation
Adds a workflow that fires on the release-published event so a human manually creating a GitHub release (e.g. when release-please aborts with 'untagged, merged release PRs outstanding') can drive the PyPI publish through CI without resorting to workflow_dispatch or local twine uploads. GITHUB_TOKEN-created releases (release-please's normal flow) do not trigger this workflow due to GitHub Actions' loop-prevention, so the existing release.yml publish job continues to handle the standard flow with no double-publish race. Intentionally no workflow_dispatch trigger. Manual deploys outside a real release-published event are how cli.deepgram.com ended up advertising 0.2.20 while PyPI was still on 0.2.19. Production publish must always anchor to a real release artifact.
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.
Summary
Adds a
publish-on-release.ymlworkflow that fires on therelease: publishedevent, so a human manually creating a GitHub release (withgh release create v0.X.Y) can drive the PyPI publish through CI withoutworkflow_dispatchand without resorting to localtwine upload.Why
Release-please got stuck on PR #50 with
autorelease: pendingafter the merge. Every subsequentrelease.ymlrun aborts at the release-please step (untagged, merged release PRs outstanding), so the existing publish path can't fire. PyPI is on 0.2.19, manifest+pyproject onmainsay 0.2.20.Manual recovery options today are:
gh release create v0.2.20 ...to create the release. But the existing publish job inrelease.ymlis gated on release-please's outputs, not on release events. Manual release alone doesn't trigger publish.twine uploadagainst PyPI. Bypasses CI entirely. No.workflow_dispatchto bypass the release-please gate. Butworkflow_dispatchis what got us into the cli.deepgram.com vs PyPI skew the other day. Removed in ci: remove workflow_dispatch from web-production #54.This PR adds a fourth option, gated on real release artifacts.
How it works
publish-on-release.ymltriggers onrelease: published. When fired:make buildandmake verify-packagespypa/gh-action-pypi-publishaction andPYPI_API_TOKENsecret as the existing publish jobIt only fires for root tags (
startsWith(github.event.release.tag_name, 'v')) so sub-package tags likedeepctl-cmd-listen-v0.0.10continue to flow throughrelease.yml.No double-publish
GITHUB_TOKEN-created releases (which is how release-please's create-release step works) do not trigger downstream workflows. GitHub Actions intentionally blocks that loop. So when release-please's normal flow works,
release.yml's existing publish job handles it as before, and this workflow stays asleep. This workflow only fires for human-created releases.(Same dynamic that the existing
web-production.ymlcomment notes for the workflow_call vs release-published trigger choice.)Recovery procedure for v0.2.20
After this lands:
gh release create v0.2.20 --target 2fab886 --title v0.2.20 --notes "$(curl -s 'https://raw.githubusercontent.com/deepgram/cli/2fab886/CHANGELOG.md' | sed -n '/^## \[0.2.20/,/^## /{/^## \[0.2.20/!{/^## /d}};p')"#50:autorelease: pending→autorelease: taggedWhat this PR doesn't do
workflow_dispatch, no scheduled run)release.yml(the normal flow continues unchanged)bump-brew-formulato fire on manual recovery releases (separate concern; brew bump is currently broken anyway due to thedeepgram-robot403 issue)Verification
python -c "import yaml; yaml.safe_load(open('.github/workflows/publish-on-release.yml'))"parses cleanlyv*tagrelease.ymlpublish job (actions/checkout@34e1148...,actions/setup-python@a309ff8...,pypa/gh-action-pypi-publish@ed0c539...)