diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 998084c..62604fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,6 @@ name: Release on: - push: - tags: - - v.* release: types: [ published ] @@ -35,11 +32,10 @@ jobs: with: name: packages path: dist/ - pypi: - if: github.event_name == 'release' + testpypi: environment: - name: pypi - url: https://pypi.org/p/chinese-whispers + name: testpypi + url: https://test.pypi.org/p/chinese-whispers permissions: id-token: write runs-on: ubuntu-latest @@ -52,14 +48,18 @@ jobs: path: dist/ - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 - testpypi: + with: + repository-url: https://test.pypi.org/legacy/ + skip-existing: true + pypi: + if: github.event_name == 'release' environment: - name: testpypi - url: https://test.pypi.org/p/chinese-whispers + name: pypi + url: https://pypi.org/p/chinese-whispers permissions: id-token: write runs-on: ubuntu-latest - needs: build + needs: testpypi steps: - name: Download packages uses: actions/download-artifact@v4 @@ -68,6 +68,3 @@ jobs: path: dist/ - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - skip-existing: true