Release #383
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_run: | |
workflows: ["test"] | |
types: | |
- completed | |
# Manual trigger | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing using PyPI | |
# A guide on how to set it up is available here: https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/ | |
# You can add a new publisher here: https://pypi.org/manage/account/publishing/ | |
if: ${{ github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success'}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PAT }} | |
- name: Python Semantic Release | |
id: release | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.PAT }} | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: steps.release.outputs.released == 'true' |