From f17af37ceb0e4be0ace86351b1474c3871c5abea Mon Sep 17 00:00:00 2001 From: melkor Date: Mon, 29 Jul 2024 19:44:29 -0700 Subject: [PATCH] Upload prepublished releases to test.pypi --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) 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 *