diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 719a388..fab931a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,8 @@ name: CD on: push: - branches: - - main + branches: [ 'main' ] + tags: [ '*' ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true @@ -237,3 +237,23 @@ jobs: with: name: wheels path: target/wheels + + release: + name: Release + runs-on: ubuntu-latest + if: "startsWith(github.ref, 'refs/tags/')" + needs: [ macos, windows, linux, linux-cross, musllinux ] + steps: + - uses: actions/download-artifact@v2 + with: + name: wheels + - uses: actions/setup-python@v2 + with: + python-version: 3.10 + - name: Publish to PyPi + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + pip install --upgrade twine + twine upload --skip-existing * \ No newline at end of file