diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 31c3a59..112b449 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,10 +12,10 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 with: enable-cache: true cache-suffix: "optional-suffix" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c5351c9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + bump-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: main + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install uv + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 + + - name: Bump version + run: uv version "${GITHUB_REF_NAME#v}" + + - name: Commit version bump + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add pyproject.toml uv.lock + git commit -m "🔖 bump version to ${GITHUB_REF_NAME#v} [skip ci]" + git push origin main