diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6d38ee0..fbd598e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,10 +1,6 @@ name: Deploy on: - workflow_run: - workflows: [ "Tests" ] - branches: [ "master" ] - types: [ "completed" ] release: types: [ "published" ] workflow_dispatch: @@ -18,7 +14,6 @@ env: jobs: build-sdist: name: build sdist - if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -34,7 +29,6 @@ jobs: name: package_sdist path: dist build: - if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} strategy: fail-fast: false matrix: @@ -107,11 +101,10 @@ jobs: with: name: package_${{ matrix.os }}_${{ matrix.target }}_${{ matrix.interpreter || 'all' }}_${{ matrix.manylinux }} path: dist - pypi: - if: github.event_name == 'release' + testpypi: environment: - name: pypi - url: https://pypi.org/p/evalica + name: testpypi + url: https://test.pypi.org/p/evalica permissions: id-token: write runs-on: ubuntu-latest @@ -126,18 +119,20 @@ jobs: merge-multiple: true path: dist - run: ls -lh dist/ - - name: Publish to PyPI + - 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/evalica + name: pypi + url: https://pypi.org/p/evalica permissions: id-token: write runs-on: ubuntu-latest - needs: - - build-sdist - - build + needs: testpypi steps: - name: Download packages uses: actions/download-artifact@v4 @@ -146,8 +141,5 @@ jobs: merge-multiple: true path: dist - run: ls -lh dist/ - - name: Publish to TestPyPI + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - skip-existing: true