Skip to content

Commit

Permalink
Changed PyPI push to OIDC
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspatzke committed Sep 2, 2023
1 parent 7cc7c44 commit d0a0c26
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- name: Install Poetry
run: pipx install poetry
- name: Verify versioning
Expand All @@ -27,14 +27,11 @@ jobs:
run: poetry run pytest
- name: Build packages
run: poetry build
- name: Configure Poetry
run: |
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }}
poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"
- name: Publish to test PyPI
if: ${{ github.event_name == 'push' }}
run: poetry publish -r testpypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish to PyPI
if: ${{ github.event_name == 'release' }}
run: poetry publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit d0a0c26

Please sign in to comment.