Manual PyPI Publish (release.yml) #3
This file contains hidden or 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_dispatch: | |
| inputs: | |
| level: | |
| description: 'Version level to bump' | |
| required: true | |
| default: 'patch' | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| ci: | |
| uses: ./.github/workflows/ci.yml | |
| secrets: inherit | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: ci | |
| concurrency: release | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Pixi | |
| uses: prefix-dev/[email protected] | |
| with: | |
| pixi-version: v0.29.0 | |
| - name: Semantic Release | |
| run: pixi run python -m semantic_release version --${{ inputs.level }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| if: github.ref == 'refs/heads/main' |