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 }}