From e7701c6e36abb04443337856c3c2f4cf11b75500 Mon Sep 17 00:00:00 2001 From: TEParsons Date: Wed, 12 Jun 2024 12:34:54 +0100 Subject: [PATCH 1/2] SYS: Automatically attach binaries on release --- .github/workflows/pypi.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index a51c96a..4d6cf73 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -27,6 +27,14 @@ jobs: - name: Build run: | python -m build + + - name: Attach binaries + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + files: | + dist/* - name: Upload to PyPi if: startsWith(github.ref, 'refs/tags/') From a2f8ad58f62e30e2e3dbbe7e8934ac8582d3308a Mon Sep 17 00:00:00 2001 From: TEParsons Date: Wed, 12 Jun 2024 12:49:26 +0100 Subject: [PATCH 2/2] SYS: Need higher permissions level to auto-attach binaries on release --- .github/workflows/pypi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 4d6cf73..5f52411 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -12,6 +12,7 @@ jobs: environment: pypi permissions: id-token: write + contents: write steps: - uses: actions/checkout@master