Skip to content

Commit

Permalink
Fixed release action
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspatzke committed Oct 28, 2023
1 parent c77472d commit 34ec3cc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
build-and-publish:
runs-on: ubuntu-20.04
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install Poetry
Expand All @@ -26,14 +29,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 34ec3cc

Please sign in to comment.