Skip to content
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
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,19 @@ jobs:
echo "Review the draft and click Publish in the Releases UI to ship."

# ---------------- Stage 2: publish + PyPI ----------------
#
# Every stage-2 job skips releases authored by mergify-ci-bot. Those are
# the test clients' releases (pytest-mergify, rspec-mergify, @mergifyio/*),
# which their now-private repository publishes itself and ci-bot mirrors
# here so their notes and files stay public. They carry no CLI binaries and
# must not reach PyPI as mergify-cli; without the skip, every mirror would
# fail the asset check below. A release created with a user token starts
# workflows, unlike one created with GITHUB_TOKEN, hence the check on the
# author rather than on how it was created.

assert-binaries-present:
name: assert binary assets attached
if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'release' && github.event.action == 'published' && github.event.release.author.login != 'mergify-ci-bot'
runs-on: ubuntu-26.04
permissions:
contents: read
Expand Down Expand Up @@ -352,15 +361,15 @@ jobs:

build-wheels-for-publish:
name: build wheels (publish stage)
if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'release' && github.event.action == 'published' && github.event.release.author.login != 'mergify-ci-bot'
needs: assert-binaries-present
uses: ./.github/workflows/build-wheels.yml
with:
stamp-version: true

publish:
name: publish to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'release' && github.event.action == 'published' && github.event.release.author.login != 'mergify-ci-bot'
runs-on: ubuntu-26.04
needs:
- assert-binaries-present
Expand Down
Loading