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
47 changes: 47 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CD

on:
workflow_dispatch:
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
dist:
runs-on: ubuntu-latest
name: Build distribution
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
Comment thread
henryiii marked this conversation as resolved.
- uses: hynek/build-and-inspect-python-package@v3.0.1

publish:
needs: [dist]
runs-on: ubuntu-latest
name: Publish to PyPI
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: pypi
url: https://pypi.org/p/pybind11_mkdoc
permissions:
id-token: write # Needed for PyPI trusted publishing and attestations
attestations: write # Needed for artifact attestation
steps:
- uses: actions/download-artifact@v8
with:
name: Packages
path: dist

- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@v4.1.1
with:
subject-path: "dist/*"

- uses: pypa/gh-action-pypi-publish@v1.14.2
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ jobs:
name: Build distribution
steps:
- uses: actions/checkout@v7
- uses: hynek/build-and-inspect-python-package@v2.18.0
- uses: hynek/build-and-inspect-python-package@v3.0.1