47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
dist:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0
|
|
|
|
publish:
|
|
needs: [dist]
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
environment:
|
|
name: pypi
|
|
url: https://pypi.org/p/cibuildwheel
|
|
permissions:
|
|
id-token: write
|
|
attestations: write
|
|
|
|
steps:
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: Packages
|
|
path: dist
|
|
|
|
- name: Generate artifact attestation for sdist and wheel
|
|
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
|
|
with:
|
|
subject-path: "dist/cibuildwheel-*"
|
|
|
|
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
with:
|
|
attestations: true
|