From 29f9ca3954e3a1b338c003ba3f434bbb108507cc Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 2 Oct 2024 14:37:53 -0400 Subject: [PATCH] ci: update deployment a bit (#922) --- .github/workflows/cd.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d824b477..b1a42d1a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -17,15 +17,11 @@ jobs: with: fetch-depth: 0 - - name: Build package - run: pipx run build - - - uses: actions/upload-artifact@v4 - with: - path: dist/* + - uses: hynek/build-and-inspect-python-package@v2 deploy: if: github.event_name == 'release' && github.event.action == 'published' + needs: [dist] runs-on: ubuntu-latest environment: name: pypi @@ -33,19 +29,18 @@ jobs: permissions: id-token: write attestations: write - contents: read - - needs: [dist] steps: - uses: actions/download-artifact@v4 with: - name: artifact + name: Packages path: dist - name: Generate artifact attestation for sdist and wheel - uses: actions/attest-build-provenance@v1.4.3 + uses: actions/attest-build-provenance@v1 with: subject-path: "dist/*" - uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true