Pre-release #4
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: Pre-release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| bump: | |
| description: "Version bump type" | |
| required: true | |
| type: choice | |
| options: | |
| - auto | |
| - major | |
| - minor | |
| - patch | |
| default: auto | |
| jobs: | |
| pre-release: | |
| runs-on: ubuntu-24.04 | |
| environment: release | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GH_RELEASE_TOKEN }} | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "pyproject.toml" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| run: uv python install 3.14 | |
| - name: Configure git identity from token owner | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} | |
| run: | | |
| user_info=$(gh api /user) | |
| git config user.name "$(echo "$user_info" | jq -r '.name // .login')" | |
| git config user.email "$(echo "$user_info" | jq -r '.id')+$(echo "$user_info" | jq -r '.login')@users.noreply.github.com" | |
| - name: Generate changelog, commit, tag, and push | |
| run: uv tool run --with tox-uv tox r -e release -- --version "${{ inputs.bump }}" |