Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/build-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build-and-publish:
uses: ./.github/workflows/lib-build-and-push.yml
uses: ./.github/workflows/lib-build.yml
with:
python-version: ${{ inputs.python-version }}
target: ${{ inputs.target }}
9 changes: 5 additions & 4 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ on:
jobs:
build-and-publish:
name: "Build wheels"
uses: ./.github/workflows/lib-build-and-push.yml
with:
upload: false
uses: ./.github/workflows/lib-build.yml

# 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') }}
# Publishing is a separate job (not inside the reusable workflow) because PyPI Trusted Publishing
# requires the *caller* workflow path in the OIDC token. A reusable workflow would embed its own
# path instead, causing an `invalid-publisher` error on the PyPI side.
# See: https://github.com/pypa/gh-action-pypi-publish/issues/166
publish:
name: "Publish wheels to PyPi"
if: ${{ endsWith(github.event.ref, 'scylla') }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ jobs:
test-wheels-build:
name: "Test wheels building"
if: "!contains(github.event.pull_request.labels.*.name, 'disable-test-build')"
uses: ./.github/workflows/lib-build-and-push.yml
permissions:
id-token: write
with:
upload: false
uses: ./.github/workflows/lib-build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
name: Build and upload to PyPi
name: Build wheels

on:
workflow_call:
inputs:
upload:
description: 'Upload to PyPI'
type: boolean
required: false
default: false

python-version:
description: 'Python version to run on'
type: string
Expand Down Expand Up @@ -146,12 +140,12 @@ jobs:
if: matrix.target != 'linux-aarch64'
shell: bash
run: |
GITHUB_WORKFLOW_REF="scylladb/python-driver/.github/workflows/lib-build-and-push.yml@refs/heads/master" cibuildwheel --output-dir wheelhouse
cibuildwheel --output-dir wheelhouse

- name: Build wheels for linux aarch64
if: matrix.target == 'linux-aarch64'
run: |
GITHUB_WORKFLOW_REF="scylladb/python-driver/.github/workflows/lib-build-and-push.yml@refs/heads/master" CIBW_BUILD="cp3*" cibuildwheel --archs aarch64 --output-dir wheelhouse
CIBW_BUILD="cp3*" cibuildwheel --archs aarch64 --output-dir wheelhouse

- uses: actions/upload-artifact@v7
with:
Expand All @@ -176,20 +170,3 @@ jobs:
with:
name: source-dist
path: dist/*.tar.gz

upload_pypi:
if: inputs.upload
needs: [build-wheels, build-sdist]
runs-on: ubuntu-24.04
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v8
with:
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
8 changes: 5 additions & 3 deletions .github/workflows/publish-manually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ on:
jobs:
build-and-publish:
name: "Build wheels"
uses: ./.github/workflows/lib-build-and-push.yml
uses: ./.github/workflows/lib-build.yml
with:
upload: false
python-version: ${{ inputs.python-version }}
ignore_tests: ${{ inputs.ignore_tests }}
target_tag: ${{ inputs.target_tag }}
target: ${{ inputs.target }}

# 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 }}
# Publishing is a separate job (not inside the reusable workflow) because PyPI Trusted Publishing
# requires the *caller* workflow path in the OIDC token. A reusable workflow would embed its own
# path instead, causing an `invalid-publisher` error on the PyPI side.
# See: https://github.com/pypa/gh-action-pypi-publish/issues/166
publish:
name: "Publish wheels to PyPi"
needs: build-and-publish
Expand Down
Loading