From 93928620c4f6c7ae0b593d957e184c6b30f7ea73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Oct 2026 01:32:30 -0700 Subject: [PATCH 1/7] feat: require pre-commit-uv release notes --- .github/workflows/check.yaml | 32 +++++ .github/workflows/prepare-release.yaml | 63 +++++++++ .github/workflows/release.yaml | 12 ++ CHANGELOG.md | 179 +++++++++++++++++++++++++ README.md | 2 + changelog.d/.gitkeep | 0 pyproject.toml | 13 +- 7 files changed, 300 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/prepare-release.yaml create mode 100644 CHANGELOG.md create mode 100644 changelog.d/.gitkeep diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index e4f019f..173e65f 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -5,6 +5,7 @@ on: branches: ["main"] tags-ignore: ["**"] pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] schedule: - cron: "0 8 * * *" @@ -53,3 +54,34 @@ jobs: run: tox run --skip-pkg-install -e ${{ matrix.env }} env: PYTEST_ADDOPTS: "-vv --durations=5" + + changelog: + if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip news') + runs-on: ubuntu-26.04 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 + with: + python-version: "3.15" + enable-cache: false + - run: uvx towncrier check --compare-with "origin/${GITHUB_BASE_REF}" + + gate: + name: Required checks pass + if: always() + needs: [test, changelog] + runs-on: ubuntu-26.04 + steps: + - env: + NEEDS_JSON: ${{ toJSON(needs) }} + run: | + jq -e ' + all( + to_entries[]; + .value.result == "success" or + (.key == "changelog" and .value.result == "skipped") + ) + ' <<< "$NEEDS_JSON" diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml new file mode 100644 index 0000000..ba7eb0c --- /dev/null +++ b/.github/workflows/prepare-release.yaml @@ -0,0 +1,63 @@ +name: Prepare release +on: + workflow_dispatch: + inputs: + version: + description: Version to release, without a v prefix + required: true +permissions: {} +concurrency: + group: prepare-release + cancel-in-progress: false +jobs: + prepare: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-26.04 + environment: release-auth + permissions: + contents: read + steps: + - id: token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: ${{ github.event.repository.name }} + permission-contents: write + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + token: ${{ steps.token.outputs.token }} + persist-credentials: true # zizmor: ignore[artipacked] the release job pushes main and its tag + - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 + with: + python-version: "3.15" + enable-cache: false + - name: Build changelog and push release + env: + VERSION: ${{ inputs.version }} + APP_USER_ID: ${{ vars.RELEASE_APP_USER_ID }} + APP_SLUG: ${{ steps.token.outputs.app-slug }} + run: | + if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "::error::expected a major.minor.patch version" + exit 1 + fi + latest=$(git tag --list '[0-9]*' | sort -V | tail -n 1) + if [[ "$(printf '%s\n' "$latest" "$VERSION" | sort -V | tail -n 1)" != "$VERSION" || "$latest" == "$VERSION" ]]; then + echo "::error::$VERSION must be newer than $latest" + exit 1 + fi + if ! compgen -G 'changelog.d/*.md' > /dev/null; then + echo "::error::no changelog fragments to release" + exit 1 + fi + uvx towncrier build --yes --version "$VERSION" + git config user.name "${APP_SLUG}[bot]" + git config user.email "$APP_USER_ID+${APP_SLUG}[bot]@users.noreply.github.com" + git add CHANGELOG.md changelog.d + git commit -m "chore: prepare $VERSION" + git tag "$VERSION" + git push origin HEAD:main + git push origin "$VERSION" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 66306f6..b397394 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,6 +17,18 @@ jobs: with: fetch-depth: 0 persist-credentials: false + - name: Require a changelog section for the tag + env: + TAG: ${{ github.ref_name }} + run: | + if [[ ! "$TAG" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "::error::unexpected release tag $TAG" + exit 1 + fi + if ! grep -qF "## $TAG (" CHANGELOG.md; then + echo "::error::CHANGELOG.md has no section for $TAG" + exit 1 + fi - name: Install the latest version of uv uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 with: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..76880ce --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,179 @@ +# Changelog + + + +## 4.4.0 (2026-10-10) + + + +### What's Changed + +- 🔧 chore: batch dependency updates weekly on Tuesday by @gaborbernat in + https://github.com/tox-dev/pre-commit-uv/pull/172 +- 👷 ci: pin ubuntu-26.04 and bump dependencies by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/181 +- feat(python): require 3.11 and default to 3.15 by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/183 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.3.0...4.4.0 + +## 4.3.0 (2026-07-20) + +No user-facing changes. This tag includes Python 3.15 CI coverage and dependency updates. + +## 4.2.2 (2026-06-19) + + + +### What's Changed + +- 🔧 chore(tox): migrate tox.ini to tox.toml by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/116 +- Migrate type checking from mypy to ty by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/117 +- Move from extras to dependency-groups by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/118 +- Align dependency versions across projects by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/120 +- Add permissions to workflows by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/121 +- Move SECURITY.md to .github/SECURITY.md by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/122 +- Add missing .github config files by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/123 +- Standardize .github files to .yaml suffix by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/126 +- 🔒 ci(workflows): add zizmor security auditing by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/131 +- Drop redundant int cast in \_new_main by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/148 +- Tolerate uv truncated pyvenv.cfg version_info by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/153 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.2.1...4.2.2 + +## 4.2.1 (2026-02-18) + + + +### What's Changed + +- 🐛 fix(venv): seed pip into hook environments by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/114 +- 🐛 fix(patch): detect python -m pre_commit by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/115 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.2.0...4.2.1 + +## 4.2.0 (2025-10-09) + + + +### What's Changed + +- fix: add support for python 3.14 by @ssbarnea in https://github.com/tox-dev/pre-commit-uv/pull/86 +- Drop 3.9 support by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/91 + +### New Contributors + +- @ssbarnea made their first contribution in https://github.com/tox-dev/pre-commit-uv/pull/86 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.1.5...4.2.0 + +## 4.1.5 (2025-08-27) + + + +### What's Changed + +- Use current project config for uv by @aaravind100 in https://github.com/tox-dev/pre-commit-uv/pull/79 + +### New Contributors + +- @aaravind100 made their first contribution in https://github.com/tox-dev/pre-commit-uv/pull/79 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.1.4...4.1.5 + +## 4.1.4 (2024-10-29) + + + +### What's Changed + +- Respect UV_PYTHON and fallback to sys.executable by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/29 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.1.3...4.1.4 + +## 4.1.3 (2024-09-23) + + + +### What's Changed + +- Patch pre-commit also when called due to a git commit by @florianfischer91 in + https://github.com/tox-dev/pre-commit-uv/pull/18 + +### New Contributors + +- @florianfischer91 made their first contribution in https://github.com/tox-dev/pre-commit-uv/pull/18 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.1.2...4.1.3 + +## 4.1.2 (2024-09-18) + + + +### What's Changed + +- Improve the CI by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/16 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.1.1...4.1.2 + +## 4.1.1 (2024-09-08) + + + +### What's Changed + +- Declare 3.13 support by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/12 + +### New Contributors + +- @dependabot made their first contribution in https://github.com/tox-dev/pre-commit-uv/pull/10 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.1.0...4.1.1 + +## 4.1.0 (2024-08-12) + + + +### What's Changed + +- Specify pre-commit-uv and uv version in --version by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/7 + +### New Contributors + +- @pre-commit-ci made their first contribution in https://github.com/tox-dev/pre-commit-uv/pull/6 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.0.3...4.1.0 + +## 4.0.3 (2024-08-08) + + + +### What's Changed + +- Ensure uv knows caller Python by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/5 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.0.2...4.0.3 + +## 4.0.2 (2024-08-07) + + + +Add installation instructions. + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.0.1...4.0.2 + +## 4.0.1 (2024-08-07) + + + +### What's Changed + +- Avoid patching import overheads and extend README by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/2 + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.0.0...4.0.1 + +## 4.0.0 (2024-08-05) + + + +- First version (using `4.0.0` as version to not break previous fork release of `3.8`). + +**Full Changelog**: https://github.com/tox-dev/pre-commit-uv/commits/4.0.0 diff --git a/README.md b/README.md index 7f7d378..0b4d525 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Use `uv` to create virtual environments and install packages for `pre-commit`. +[Changelog](CHANGELOG.md) + ## Installation With pipx: diff --git a/changelog.d/.gitkeep b/changelog.d/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml index 866977d..23620a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ dependencies = [ ] urls."Bug Tracker" = "https://github.com/tox-dev/pre-commit-uv/issues" urls."Source Code" = "https://github.com/tox-dev/pre-commit-uv" -urls.Changelog = "https://github.com/tox-dev/pre-commit-uv/releases" +urls.Changelog = "https://github.com/tox-dev/pre-commit-uv/blob/main/CHANGELOG.md" urls.Documentation = "https://github.com/tox-dev/pre-commit-uv/" [dependency-groups] @@ -149,3 +149,14 @@ paths.source = [ report.fail_under = 63 html.show_contexts = true html.skip_covered = false + +[tool.towncrier] +name = "pre-commit-uv" +directory = "changelog.d" +filename = "CHANGELOG.md" +title_format = "## {version} ({project_date})" +type = [ + { directory = "feature", name = "Features", showcontent = true }, + { directory = "bugfix", name = "Bug fixes", showcontent = true }, + { directory = "doc", name = "Documentation", showcontent = true }, +] From 7e0d33b894deedbd6314ac868b857259d3fbfc65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Oct 2026 01:34:00 -0700 Subject: [PATCH 2/7] docs: drop generated release note comments --- CHANGELOG.md | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76880ce..91c42d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,6 @@ ## 4.4.0 (2026-10-10) - - ### What's Changed - 🔧 chore: batch dependency updates weekly on Tuesday by @gaborbernat in @@ -21,8 +19,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.2.2 (2026-06-19) - - ### What's Changed - 🔧 chore(tox): migrate tox.ini to tox.toml by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/116 @@ -41,8 +37,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.2.1 (2026-02-18) - - ### What's Changed - 🐛 fix(venv): seed pip into hook environments by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/114 @@ -52,8 +46,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.2.0 (2025-10-09) - - ### What's Changed - fix: add support for python 3.14 by @ssbarnea in https://github.com/tox-dev/pre-commit-uv/pull/86 @@ -67,8 +59,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.1.5 (2025-08-27) - - ### What's Changed - Use current project config for uv by @aaravind100 in https://github.com/tox-dev/pre-commit-uv/pull/79 @@ -81,8 +71,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.1.4 (2024-10-29) - - ### What's Changed - Respect UV_PYTHON and fallback to sys.executable by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/29 @@ -91,8 +79,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.1.3 (2024-09-23) - - ### What's Changed - Patch pre-commit also when called due to a git commit by @florianfischer91 in @@ -106,8 +92,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.1.2 (2024-09-18) - - ### What's Changed - Improve the CI by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/16 @@ -116,8 +100,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.1.1 (2024-09-08) - - ### What's Changed - Declare 3.13 support by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/12 @@ -130,8 +112,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.1.0 (2024-08-12) - - ### What's Changed - Specify pre-commit-uv and uv version in --version by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/7 @@ -144,8 +124,6 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.0.3 (2024-08-08) - - ### What's Changed - Ensure uv knows caller Python by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/5 @@ -154,16 +132,12 @@ No user-facing changes. This tag includes Python 3.15 CI coverage and dependency ## 4.0.2 (2024-08-07) - - Add installation instructions. **Full Changelog**: https://github.com/tox-dev/pre-commit-uv/compare/4.0.1...4.0.2 ## 4.0.1 (2024-08-07) - - ### What's Changed - Avoid patching import overheads and extend README by @gaborbernat in https://github.com/tox-dev/pre-commit-uv/pull/2 @@ -172,8 +146,6 @@ Add installation instructions. ## 4.0.0 (2024-08-05) - - - First version (using `4.0.0` as version to not break previous fork release of `3.8`). **Full Changelog**: https://github.com/tox-dev/pre-commit-uv/commits/4.0.0 From b44e8515d865184838909713722bb572e88f0141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Oct 2026 01:46:41 -0700 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=91=B7=20ci(release):=20resolve=20the?= =?UTF-8?q?=20app=20bot=20identity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/prepare-release.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index ba7eb0c..de3703c 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -37,7 +37,7 @@ jobs: - name: Build changelog and push release env: VERSION: ${{ inputs.version }} - APP_USER_ID: ${{ vars.RELEASE_APP_USER_ID }} + GH_TOKEN: ${{ steps.token.outputs.token }} APP_SLUG: ${{ steps.token.outputs.app-slug }} run: | if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then @@ -55,7 +55,8 @@ jobs: fi uvx towncrier build --yes --version "$VERSION" git config user.name "${APP_SLUG}[bot]" - git config user.email "$APP_USER_ID+${APP_SLUG}[bot]@users.noreply.github.com" + app_user_id=$(gh api "/users/${APP_SLUG}[bot]" --jq .id) + git config user.email "${app_user_id}+${APP_SLUG}[bot]@users.noreply.github.com" git add CHANGELOG.md changelog.d git commit -m "chore: prepare $VERSION" git tag "$VERSION" From 98fb41ed39de8cd49455d956f62730b3cfa5e77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Oct 2026 02:35:06 -0700 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=90=9B=20fix(release):=20isolate=20ch?= =?UTF-8?q?angelog=20assembly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/prepare-release.yaml | 75 ++++++++++++++++++++------ 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index de3703c..7984b23 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -10,36 +10,25 @@ concurrency: group: prepare-release cancel-in-progress: false jobs: - prepare: + assemble: if: github.ref == 'refs/heads/main' runs-on: ubuntu-26.04 - environment: release-auth permissions: contents: read steps: - - id: token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - with: - client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} - private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - repositories: ${{ github.event.repository.name }} - permission-contents: write - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - token: ${{ steps.token.outputs.token }} - persist-credentials: true # zizmor: ignore[artipacked] the release job pushes main and its tag + persist-credentials: false - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 with: python-version: "3.15" enable-cache: false - - name: Build changelog and push release + - name: Build release patch env: VERSION: ${{ inputs.version }} - GH_TOKEN: ${{ steps.token.outputs.token }} - APP_SLUG: ${{ steps.token.outputs.app-slug }} run: | + set -euo pipefail if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "::error::expected a major.minor.patch version" exit 1 @@ -54,11 +43,63 @@ jobs: exit 1 fi uvx towncrier build --yes --version "$VERSION" - git config user.name "${APP_SLUG}[bot]" + git diff HEAD --binary > "$RUNNER_TEMP/release.patch" + test -s "$RUNNER_TEMP/release.patch" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: release-patch + path: ${{ runner.temp }}/release.patch + if-no-files-found: error + push: + needs: assemble + runs-on: ubuntu-26.04 + environment: release-auth + permissions: + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: release-patch + path: ${{ runner.temp }}/release-patch + - name: Validate release patch + env: + VERSION: ${{ inputs.version }} + run: | + set -euo pipefail + git apply --check "$RUNNER_TEMP/release-patch/release.patch" + git apply --index "$RUNNER_TEMP/release-patch/release.patch" + while IFS= read -r path; do + case "$path" in + CHANGELOG.md|changelog.d/*.md) ;; + *) echo "::error::unexpected release path: $path"; exit 1 ;; + esac + done < <(git diff --cached --name-only) + grep -Fq "## $VERSION (" CHANGELOG.md + git diff --cached --check + - id: token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: ${{ github.event.repository.name }} + permission-contents: write + - name: Commit and tag the release + env: + VERSION: ${{ inputs.version }} + GH_TOKEN: ${{ steps.token.outputs.token }} + APP_SLUG: ${{ steps.token.outputs.app-slug }} + run: | + set -euo pipefail app_user_id=$(gh api "/users/${APP_SLUG}[bot]" --jq .id) + git config user.name "${APP_SLUG}[bot]" git config user.email "${app_user_id}+${APP_SLUG}[bot]@users.noreply.github.com" - git add CHANGELOG.md changelog.d git commit -m "chore: prepare $VERSION" git tag "$VERSION" + gh auth setup-git --hostname github.com --force git push origin HEAD:main git push origin "$VERSION" From 98a8a23da8400bef99e21791485fc58c36382312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Oct 2026 03:44:38 -0700 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=94=92=20Push=20release=20refs=20atom?= =?UTF-8?q?ically?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/prepare-release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index 7984b23..12fab7e 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -101,5 +101,4 @@ jobs: git commit -m "chore: prepare $VERSION" git tag "$VERSION" gh auth setup-git --hostname github.com --force - git push origin HEAD:main - git push origin "$VERSION" + git push --atomic origin HEAD:main "refs/tags/$VERSION" From cc2022b1ebe858e4031153119f8c76a442c7b0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Oct 2026 09:21:47 -0700 Subject: [PATCH 6/7] =?UTF-8?q?=F0=9F=90=9B=20fix(release):=20refresh=20ma?= =?UTF-8?q?in=20before=20push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/prepare-release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index 12fab7e..cfb8738 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -70,6 +70,8 @@ jobs: VERSION: ${{ inputs.version }} run: | set -euo pipefail + git fetch origin main + git reset --hard origin/main git apply --check "$RUNNER_TEMP/release-patch/release.patch" git apply --index "$RUNNER_TEMP/release-patch/release.patch" while IFS= read -r path; do From 51a8cbd2735dbcfbe35426ad3b5924a688cae7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Oct 2026 09:21:47 -0700 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=91=B7=20ci:=20label=20automation=20P?= =?UTF-8?q?Rs=20skip=20news?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/dependabot.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 10e740e..435d98f 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -2,6 +2,10 @@ version: 2 updates: - package-ecosystem: "github-actions" directory: "/" + labels: + - dependencies + - github_actions + - skip news schedule: interval: "weekly" day: "tuesday"