diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 880184e1..25df117d 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,7 +1,13 @@ name: PyPI on: -- push +- push: + tags: + - 'v*' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true jobs: archive: @@ -46,8 +52,7 @@ jobs: name: cibw-wheels-${{ matrix.os }} path: wheelhouse/*.whl - test: - if: ${{ !startsWith(github.ref, 'refs/tags/') }} + release: needs: - archive - build @@ -64,23 +69,3 @@ jobs: pattern: '*' merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - - release: - if: ${{ startsWith(github.ref, 'refs/tags/') }} - needs: - - archive - - build - runs-on: ubuntu-latest - environment: - name: testpypi - url: https://pypi.org/p/dispatch-functions - permissions: - id-token: write - steps: - - uses: actions/download-artifact@v4 - with: - path: dist - pattern: cibw-wheels-* - - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f2ea4fb..ce8bf76d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,10 @@ name: Test on: - push +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + permissions: contents: read