Skip to content

Commit

Permalink
ci: add environments to setup trusted publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Dec 13, 2024
1 parent 501d084 commit 756f3fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ jobs:
needs: [build_wheels_macos, build_wheels_linux, build_wheels_windows, build_sdist]
runs-on: ubuntu-20.04
if: github.event_name == 'push' && !(startsWith(github.ref, 'refs/tags/v'))
environment: test-pypi
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -233,14 +234,15 @@ jobs:
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
repository-url: https://test.pypi.org/legacy/
skip-existing: true

upload_pypi:
name: Upload to PyPI (prod)
needs: [build_wheels_macos, build_wheels_linux, build_wheels_windows, build_sdist]
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
environment: pypi
steps:
- uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit 756f3fa

Please sign in to comment.