You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI: remove dead upload_pypi job from reusable workflow, rename to lib-build.yml
Closes#824. Follow-up to #820.
The upload_pypi job in lib-build-and-push.yml was never reachable: none of the
four caller workflows pass upload: true. build-push.yml and publish-manually.yml
already publish from their own separate jobs (necessary due to how PyPI Trusted
Publishing embeds the caller workflow path in the OIDC token).
Because the reusable workflow declared 'permissions: id-token: write' for
upload_pypi, GitHub's static permission validation forced build-test.yml (a
pull_request workflow, which defaults to id-token: none) to also declare
id-token: write — granting unnecessary privileges to a job that only builds
wheels.
Changes:
- Rename lib-build-and-push.yml -> lib-build.yml (it only builds now)
- Remove upload input and upload_pypi job from the reusable workflow
- Remove 'permissions: id-token: write' and 'with: upload: false' from
build-test.yml (no longer needed)
- Update all callers (build-push.yml, publish-manually.yml, build-pre-release.yml)
to reference the new workflow path and drop upload: false from with: blocks
- Replace TODO comments in build-push.yml and publish-manually.yml with an
explanatory comment: the separate publish job is now intentional design,
not a temporary workaround
Copy file name to clipboardExpand all lines: .github/workflows/build-push.yml
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,12 @@ on:
10
10
jobs:
11
11
build-and-publish:
12
12
name: "Build wheels"
13
-
uses: ./.github/workflows/lib-build-and-push.yml
14
-
with:
15
-
upload: false
13
+
uses: ./.github/workflows/lib-build.yml
16
14
17
-
# TODO: Remove when https://github.com/pypa/gh-action-pypi-publish/issues/166 is fixed and update build-and-publish.with.upload to ${{ endsWith(github.event.ref, 'scylla') }}
15
+
# Publishing is a separate job (not inside the reusable workflow) because PyPI Trusted Publishing
16
+
# requires the *caller* workflow path in the OIDC token. A reusable workflow would embed its own
17
+
# path instead, causing an `invalid-publisher` error on the PyPI side.
Copy file name to clipboardExpand all lines: .github/workflows/publish-manually.yml
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,15 +39,17 @@ on:
39
39
jobs:
40
40
build-and-publish:
41
41
name: "Build wheels"
42
-
uses: ./.github/workflows/lib-build-and-push.yml
42
+
uses: ./.github/workflows/lib-build.yml
43
43
with:
44
-
upload: false
45
44
python-version: ${{ inputs.python-version }}
46
45
ignore_tests: ${{ inputs.ignore_tests }}
47
46
target_tag: ${{ inputs.target_tag }}
48
47
target: ${{ inputs.target }}
49
48
50
-
# TODO: Remove when https://github.com/pypa/gh-action-pypi-publish/issues/166 is fixed and update build-and-publish.with.upload to ${{ inputs.upload }}
49
+
# Publishing is a separate job (not inside the reusable workflow) because PyPI Trusted Publishing
50
+
# requires the *caller* workflow path in the OIDC token. A reusable workflow would embed its own
51
+
# path instead, causing an `invalid-publisher` error on the PyPI side.
0 commit comments