Skip to content

Commit

Permalink
Release action with OIDC
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspatzke committed Sep 1, 2023
1 parent 24e6b65 commit b645b69
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
jobs:
build-and-publish:
runs-on: ubuntu-20.04
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand All @@ -35,7 +39,9 @@ jobs:
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 b645b69

Please sign in to comment.