CI: Uploads all Python wheels in one batch

Avoids partial releases in Pypi
pull/731/head
Tpt 10 months ago committed by Thomas Tanon
parent cffc536eb9
commit c2df0b829d
  1. 75
      .github/workflows/artifacts.yml

@ -111,11 +111,6 @@ jobs:
python_sdist:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyoxigraph
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
@ -135,20 +130,11 @@ jobs:
- run: maturin sdist -m python/Cargo.toml
- uses: actions/upload-artifact@v3
with:
name: pyoxigraph_source
name: pyoxigraph_dist
path: target/wheels/*.tar.gz
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: target/wheels
if: github.event_name == 'release'
wheel_linux:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyoxigraph
permissions:
id-token: write
strategy:
matrix:
architecture: [ "x86_64", "aarch64" ]
@ -167,20 +153,11 @@ jobs:
if: github.event_name == 'release' || matrix.architecture == 'x86_64'
- uses: actions/upload-artifact@v3
with:
name: pyoxigraph_wheel_linux_gnu
name: pyoxigraph_dist
path: target/wheels/*.whl
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: target/wheels
if: github.event_name == 'release'
wheel_linux_musl:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyoxigraph
permissions:
id-token: write
strategy:
matrix:
architecture: [ "x86_64", "aarch64" ]
@ -199,20 +176,11 @@ jobs:
if: github.event_name == 'release' || matrix.architecture == 'x86_64'
- uses: actions/upload-artifact@v3
with:
name: pyoxigraph_wheel_linux_musl
name: pyoxigraph_dist
path: target/wheels/*.whl
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: target/wheels
if: github.event_name == 'release'
wheel_mac:
runs-on: macos-latest
environment:
name: pypi
url: https://pypi.org/p/pyoxigraph
permissions:
id-token: write
env:
DEVELOPER_DIR: '/Applications/Xcode.app/Contents/Developer'
SDKROOT: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'
@ -246,20 +214,11 @@ jobs:
if: github.event_name == 'release'
- uses: actions/upload-artifact@v3
with:
name: pyoxigraph_wheel_mac
name: pyoxigraph_dist
path: target/wheels/*.whl
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: target/wheels
if: github.event_name == 'release'
wheel_windows:
runs-on: windows-latest
environment:
name: pypi
url: https://pypi.org/p/pyoxigraph
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
@ -281,12 +240,32 @@ jobs:
- run: maturin build --release -m python/Cargo.toml --features abi3
- uses: actions/upload-artifact@v3
with:
name: pyoxigraph_wheel_windows
name: pyoxigraph_dist
path: target/wheels/*.whl
publish_pypi:
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyoxigraph
permissions:
id-token: write
needs:
- python_sdist
- wheel_windows
- wheel_mac
- wheel_linux
- wheel_linux_musl
steps:
- uses: actions/download-artifact@v3
with:
name: pyoxigraph_dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: target/wheels
if: github.event_name == 'release'
packages-dir: dist
skip-existing: true
npm_tarball:
runs-on: ubuntu-latest

Loading…
Cancel
Save