From 5b9001596e08f91401695a089573d9147603a8e0 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 4 Feb 2025 19:23:53 +0100 Subject: [PATCH] fix: pypi upload (#202) --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 631fd1e..fb05c15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,9 @@ jobs: - test - lint - commitlint + permissions: + id-token: write + contents: write steps: - uses: actions/checkout@v4 @@ -83,8 +86,17 @@ jobs: # - Update version in code # - Create git tag # - Create GitHub release - # - Publish to PyPI - name: Python Semantic Release + id: release uses: python-semantic-release/python-semantic-release@v9.17.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + if: steps.release.outputs.released == 'true' + - name: Upload Github Release Assets + uses: python-semantic-release/publish-action@v9.17.0 + if: steps.release.outputs.released == 'true' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.release.outputs.tag }}