blob: 8802c29d79b88c9c250893287df5e0fd97fdca79 [file]
name: spatialbench-cli-publish-pypi
on:
release:
types: [created]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
uses: ./.github/workflows/build-py-packages.yml
with:
upload-artifacts: true
release:
name: Release
runs-on: ubuntu-latest
environment: pypi
needs: [build]
permissions:
id-token: write # Use to sign the release artifacts and for pypi trusted publishing
attestations: write # Used to generate artifact attestation
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v7
with:
pattern: '*'
merge-multiple: true
path: dist
- name: Install twine
run: python -m pip install --upgrade twine
- name: Check distributions
run: python -m twine check --strict dist/*
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-path: 'dist/*'
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing dist/*