Skip to content

Commit

Permalink
enhance: [25]Publishing releases with trusted publisher (#2581)
Browse files Browse the repository at this point in the history
  • Loading branch information
XuanYang-cn authored Jan 21, 2025
1 parent dc35ea2 commit b5fd27e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish_on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write

steps:
- name: Check out from Git
Expand Down Expand Up @@ -37,10 +40,7 @@ jobs:
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TOKEN_TEST_PYPI }}
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit b5fd27e

Please sign in to comment.