diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 746b76d..7a516ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,7 @@ name: Python on: - push: - branches: - - main - - ci-test - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + release: + types: [prereleased] jobs: macos: runs-on: macos-latest @@ -121,3 +117,28 @@ jobs: with: name: wheels-${{ github.job }}-${{ matrix.target }} path: dist + release: + name: Release + runs-on: ubuntu-latest + needs: [macos, windows, linux, linux-cross] + steps: + - uses: actions/download-artifact@v4 + with: + pattern: wheels-* + merge-multiple: true + - name: Upload release assets + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: * + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} + run: | + pip install --upgrade twine + twine upload --repository testpypi --skip-existing *