Skip to content

Commit

Permalink
ci: use trusted publishing with pypi (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
aryarm authored Jun 19, 2024
1 parent 2f2f6f8 commit ceb5cc8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
Expand Down Expand Up @@ -53,15 +57,10 @@ jobs:
- name: Publish package on TestPyPI
if: ${{ steps.release.outputs.release_created }}
uses: pypa/gh-action-pypi-publish@v1.5.0
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish package on PyPI
if: ${{ steps.release.outputs.release_created }}
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
uses: pypa/gh-action-pypi-publish@v1.8.14

0 comments on commit ceb5cc8

Please sign in to comment.