Skip to content

Commit

Permalink
add trusted publisher workflow (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAntoineSchmidtQC committed Oct 17, 2023
1 parent e7ef80a commit 11a47ae
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,35 @@ jobs:
path: dist/*.tar.gz

upload_testpypi:
if: github.event_name == 'release' && github.event.action == 'published'
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: test_release
url: https://test.pypi.org/p/glum
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.GH_TESTPYPI_UPLOAD }}
repository-url: https://test.pypi.org/legacy/

upload_pypi:
if: github.event_name == 'release' && github.event.action == 'published'
needs: [build_wheels, build_sdist, upload_testpypi]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: release
url: https://pypi.org/p/glum
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.GH_PYPI_UPLOAD }}

0 comments on commit 11a47ae

Please sign in to comment.