name: Build
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
jobs:
Run-Checks:
uses: ./.github/workflows/Checks.yaml
Update-Tag:
needs: Run-Checks
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.update_tag.outputs.tag }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v7
- name: Update Tag
id: update_tag
run: |
NEW_TAG="v$(uvx AutoGitSemVer --no-branch-name --no-metadata --quiet)"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag $NEW_TAG
git push origin $NEW_TAG
echo "tag=$NEW_TAG" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Build-and-Release:
needs: Update-Tag
uses: ./.github/workflows/Release.yaml
with:
tag: ${{ needs.Update-Tag.outputs.tag }}