Skip to content

Commit 0afcfa0

Browse files
authored
Merge pull request #467 from Integration-Automation/chore/publish-on-merge
Put releases back on merges to main
2 parents 99f62a7 + 845e27f commit 0afcfa0

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ jobs:
5656

5757
publish:
5858
needs: build
59+
# Publishing happens on merge to main (stable.yml), so this path stays
60+
# off: the tags stable.yml pushes would otherwise start a second upload
61+
# of a version PyPI already has. The build job above still runs on every
62+
# v* tag — it verifies the tag matches pyproject, smoke-tests the wheel
63+
# and attests provenance. To go back to tag-driven releases, register a
64+
# PyPI trusted publisher for release.yml, drop this condition, and put
65+
# stable.yml's publish job back behind `if: ${{ false }}`.
66+
if: ${{ false }}
5967
runs-on: ubuntu-latest
6068
environment:
6169
name: pypi

.github/workflows/stable.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,12 @@ jobs:
118118

119119
publish:
120120
needs: test
121-
# Publishing moved to release.yml: immutable v* tags + Trusted Publishing.
122-
if: ${{ false }}
121+
# Releases ride on merges to main: this job bumps the patch version,
122+
# uploads to PyPI with the PYPI_API_TOKEN secret, then pushes the bump
123+
# commit (marked [skip ci]) and its v* tag. The guard is what keeps it
124+
# off pull requests and the nightly schedule, which the same workflow
125+
# also triggers on — without it every PR would cut a release.
126+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
123127
runs-on: ubuntu-latest
124128
permissions:
125129
contents: write

0 commit comments

Comments
 (0)