Skip to content

Commit

Permalink
pypa trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
szn committed Oct 24, 2023
1 parent c660a63 commit 1ce49ae
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-20.04
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/confluence.md
steps:
- uses: actions/checkout@main
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install pypa/build
Expand All @@ -29,10 +34,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
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 1ce49ae

Please sign in to comment.