ci(release): publish on tag push, not only on GitHub Release - #15
Open
laynepenney wants to merge 1 commit into
Open
ci(release): publish on tag push, not only on GitHub Release#15laynepenney wants to merge 1 commit into
laynepenney wants to merge 1 commit into
Conversation
Add a 'push: tags: [v*]' trigger to both publish workflows so a tag push publishes to PyPI and npm, in addition to the existing 'release: published' path. Additive and idempotent — a 'gh release create <tag>' that fires both events is safe: PyPI skip-existing and the npm already-published check no-op the second attempt. Deliberately NOT adding a tag<->package-version guard: this repo's version-sync-deferred design allows the PyPI and npm versions to diverge, so a strict tag==version assertion would fight that design. Flagged for synapt-side review (see PR body). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Adds a
push: tags: ['v*']trigger topublish-pypi.ymlandpublish-npm.ymlso a tag push publishes — the "publish via tag on gh" mechanism Layne asked for. Additive: the existingrelease: [published]path stays, sogh release create <tag>still works (and still uploads the SBOM to the release).Why it's safe
Idempotent double-fire:
gh release create v0.1.0fires both the tag-push and the release event. PyPI'sskip-existing: trueand npm's existing "already published → skip" check make the second attempt a no-op. Trusted publishing (OIDC,environment: pypi,id-token: write) is untouched — it binds to the workflow file + environment, not the trigger, so changing the trigger doesn't affect auth.Two things for synapt-side review (flagged, not decided by me)
tag == package versionassertion would prevent a mistagged publish, but this repo'sversion-sync-deferreddesign (per thepublish-npm.ymlcomment) allows PyPI and npm versions to diverge. A guard would fight that. Whether/how to guard the tag↔version relationship is a synapt versioning-convention call — left to you.synapt-dev/eval, workflowpublish-pypi.yml, environmentpypi. If it was added as a pending publisher when the project was created, it activates on first publish; if not, the first run fails OIDC auth. Worth confirming before the first tag.First real tag push is the SACRED first publish — Layne's / a coordinated moment.