Skip to content

Manual PyPI Publish (release.yml) #3

Manual PyPI Publish (release.yml)

Manual PyPI Publish (release.yml) #3

Workflow file for this run

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'