Skip to content

Commit

Permalink
fix(ci): split testpypi from pypi publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ionicsolutions committed Oct 28, 2023
1 parent a939cdd commit dc86d11
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ jobs:
run: |
pytest tests/
publish:
name: Publish to PyPI
publish-test:
name: Publish to Test PyPI
if: startsWith(github.ref, 'refs/tags')
needs:
- test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/visualime
name: testpypi
url: https://test.pypi.org/p/visualime
permissions:
id-token: write
steps:
Expand All @@ -116,6 +116,23 @@ jobs:
packages_dir: .
verbose: true

publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
needs:
- publish-test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/visualime
permissions:
id-token: write
steps:
- name: Download distribution
uses: actions/download-artifact@v3
with:
name: distribution

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit dc86d11

Please sign in to comment.