Skip to content

ci: only run publish-pypi on real releases, not every main merge#4632

Merged
dbrattli merged 1 commit into
mainfrom
fix/release-pypi-only-on-release
Jun 7, 2026
Merged

ci: only run publish-pypi on real releases, not every main merge#4632
dbrattli merged 1 commit into
mainfrom
fix/release-pypi-only-on-release

Conversation

@dbrattli
Copy link
Copy Markdown
Collaborator

@dbrattli dbrattli commented Jun 7, 2026

Summary

publish-pypi.yml triggered on every push to main, kicking off the full cross-platform wheel build (linux/musllinux/windows/macos/sdist) plus the test matrix — on every merge. The actual release publish job was already gated to release/workflow_dispatch, so pushes built and tested everything only to skip publishing. Wasted CI on every merge.

This removes the push: branches: [main] trigger so the workflow only runs on:

  • release: [published] — a real new release (the intended path)
  • workflow_dispatch — manual runs

Ordinary build/PR validation is still covered by build.yml, which runs on push to main and PRs.

Note: version is derived via dunamai ... --latest-tag, so releases should continue to be cut by publishing a GitHub Release (which creates the tag) — exactly the release: published event that still triggers this workflow.

🤖 Generated with Claude Code

Remove the `push: branches: [main]` trigger from publish-pypi.yml so the
cross-platform wheel build and test matrix no longer run on every merge to
main. The publish job was already gated to release/workflow_dispatch, so
pushes only wasted CI. Build/PR validation remains covered by build.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli merged commit 09c0f94 into main Jun 7, 2026
31 checks passed
@dbrattli dbrattli deleted the fix/release-pypi-only-on-release branch June 7, 2026 09:10
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.

1 participant