diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 6c934eb..4eb9e70 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -3,6 +3,7 @@ name: build-wheels on: push: branches: ["main", "master"] + tags: ["v*"] pull_request: workflow_dispatch: @@ -41,3 +42,23 @@ jobs: with: name: wheels-${{ matrix.os }} path: wheelhouse/*.whl + + release: + name: Create GitHub Release + needs: build + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + permissions: + contents: write + steps: + - name: Download all wheels + uses: actions/download-artifact@v7 + with: + pattern: wheels-* + path: wheelhouse + merge-multiple: true + + - name: Publish GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: wheelhouse/*.whl