Release #144
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: | |
| bump: | |
| description: Semantic version bump to apply | |
| required: true | |
| default: patch | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| release: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Configure Git author | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Bump version, sync manifests, and tag | |
| run: | | |
| # cz bump updates every manifest listed in .cz.toml's version_files | |
| # (VERSION + backend/webui/tauri) and creates the commit + tag in one | |
| # step, so the tag points at a tree where all manifests already match. | |
| uv run --with commitizen cz bump --increment "${{ inputs.bump }}" --yes | |
| # Guard: fail the release if any tracked manifest drifted from VERSION | |
| # (e.g. sync_version.py grew a manifest that version_files didn't). | |
| python3 scripts/sync_version.py --check | |
| - name: Push release commit and tag | |
| run: | | |
| VERSION="$(cat VERSION)" | |
| git push origin HEAD:main | |
| git push origin "v${VERSION}" | |
| - name: Create GitHub release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| VERSION="$(cat VERSION)" | |
| gh release create "v${VERSION}" --generate-notes | |
| - name: Save version for downstream jobs | |
| id: version | |
| run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| docker: | |
| needs: release | |
| uses: ./.github/workflows/docker-publish.yml | |
| with: | |
| version: ${{ needs.release.outputs.version }} | |
| ref: refs/tags/v${{ needs.release.outputs.version }} | |
| push_latest: true | |
| secrets: inherit | |
| # Build + attach the desktop installers. Called directly (not via the tag event) | |
| # because the release tag is pushed with GITHUB_TOKEN, which does not fire | |
| # `push: tags` in other workflows. | |
| desktop: | |
| needs: release | |
| uses: ./.github/workflows/desktop-release.yml | |
| with: | |
| tag: v${{ needs.release.outputs.version }} | |
| secrets: inherit |