Skip to content

CI: publish to PyPI only on a published GitHub Release - #10

Merged
gauravharsha merged 2 commits into
mainfrom
pypi-upload-on-release
Jul 9, 2026
Merged

CI: publish to PyPI only on a published GitHub Release#10
gauravharsha merged 2 commits into
mainfrom
pypi-upload-on-release

Conversation

@gauravharsha

Copy link
Copy Markdown
Contributor

Summary

Change the upload_pypi trigger from any v* tag push to a published GitHub Release, matching green-igen and green-mbtools.

  • on: now listens for release: [published] (build on push/PR is unchanged).
  • upload_pypi fires on github.event_name == 'release', so on: and the if are consistent.

Why

Uploading on any tag push is easy to trigger accidentally; publishing a GitHub Release is a deliberate, gated action. This also makes the release mechanism uniform across the three Green packages.

Note

CI-only change — no version bump (0.2.8 is already released). Takes effect on the next release: publish a Release (e.g. gh release create v…) to build + upload.

🤖 Generated with Claude Code

Previously upload_pypi fired on any 'v*' tag push. Uploading on a
deliberate, gated GitHub Release is safer, and matches green-igen /
green-mbtools. The workflow now listens for release:[published] and the
upload_pypi condition checks github.event_name == 'release', keeping
on: and if consistent (no build/PR change).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (18b3090) to head (47acedf).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #10   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          222       222           
=========================================
  Hits           222       222           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the CI/CD workflow so that publishing to PyPI happens only when a GitHub Release is published, instead of on any v* tag push. This reduces the chance of accidentally triggering a production publish via an incidental tag push.

Changes:

  • Switch workflow trigger configuration from on: [push, pull_request] to explicit push, pull_request, and release: [published].
  • Gate the upload_pypi job to run only for the release event.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build_wheels.yml
Comment thread .github/workflows/build_wheels.yml Outdated
- push: ignore v* tags. Publishing a release already builds via
  `release: published`; without this the release tag push would trigger a
  second, redundant build.
- upload_pypi: gate on `github.event.action == 'published'` in addition to
  `event_name == 'release'`, so the job is self-contained and safe even if
  the release trigger types are broadened later.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gauravharsha
gauravharsha merged commit 90a4ddc into main Jul 9, 2026
5 checks passed
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.

3 participants