Skip to content

Navigation Menu

Sign in
Sign up

ci: publish on tag push instead of the release event #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
chengzeyi merged 1 commit into main from ci/publish-on-tag-push
Aug 21, 2026
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/python-publish.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@

name: python-publish

# Triggered by the tag push itself, not by the GitHub Release.
# python-packages.yml creates that Release using GITHUB_TOKEN, and GitHub's
# anti-recursion rule means events produced by GITHUB_TOKEN never start another
# workflow — so `release: published` silently never fired here and the package
# was never uploaded, while every other check went green.
on:
release:
types: [published]
push:
tags:
- "v[0-9]+*"
Comment on lines +17 to +19

@chatgpt-codex-connector chatgpt-codex-connector Bot Aug 21, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate PyPI publishing on the GitHub release

On a version-tag push this workflow now runs independently of .github/workflows/python-packages.yml; in that workflow, gh_release is a separate job guarded by the github-release environment, with no dependency connecting it to this deployment. If the release job is awaiting approval or fails, this job can still irreversibly publish the package to PyPI, whereas the previous release: published trigger guaranteed that the GitHub release existed first. Run publishing after gh_release succeeds or otherwise trigger it from that successful workflow.

Useful? React with 👍 / 👎.

workflow_dispatch:

permissions:
Expand All @@ -20,7 +26,7 @@ jobs:
deploy:
if: >-
github.repository == 'WaveSpeedAI/wavespeed-python' &&
((github.event_name == 'release' && github.ref_type == 'tag' &&
((github.event_name == 'push' && github.ref_type == 'tag' &&
startsWith(github.ref, 'refs/tags/v')) ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'))
runs-on: ubuntu-latest
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /