Skip to content

Commit 1a5bdaa

Browse files
committed
[build] Dispatch PyPI publishes on the release tag ref
1 parent 4a167fe commit 1a5bdaa

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ jobs:
133133
run: |
134134
set -euo pipefail
135135
source "$RUNNER_TEMP/dispatch.sh"
136-
dispatch_and_watch publish-pypi.yml "$GITHUB_REF_NAME" -f "tag=$TAG" -f "environment=testpypi"
136+
# Dispatched on the release tag: the pypi environment's deployment
137+
# branch policy only permits release refs (v* tags / releases/*
138+
# branches), and the tag is the immutable ref being released anyway.
139+
dispatch_and_watch publish-pypi.yml "$TAG" -f "tag=$TAG" -f "environment=testpypi"
137140
138141
- name: 'Stage 2 - Verify: pip install from TestPyPI'
139142
run: |
@@ -163,8 +166,9 @@ jobs:
163166
set -euo pipefail
164167
source "$RUNNER_TEMP/dispatch.sh"
165168
# publish-pypi.yml additionally gates production publishes on the
166-
# build + release-test workflows being green for the tag.
167-
dispatch_and_watch publish-pypi.yml "$GITHUB_REF_NAME" -f "tag=$TAG" -f "environment=pypi"
169+
# build + release-test workflows being green for the tag. Dispatched
170+
# on the tag ref to satisfy the pypi environment's deployment policy.
171+
dispatch_and_watch publish-pypi.yml "$TAG" -f "tag=$TAG" -f "environment=pypi"
168172
169173
- name: 'Stage 4 - Verify: pip install from PyPI'
170174
if: ${{ !inputs.verify-only }}

0 commit comments

Comments
 (0)