From 0d8240a7aaf7bba79a144095379b4dc77f2c56be Mon Sep 17 00:00:00 2001 From: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com> Date: Mon, 23 Nov 2026 20:25:33 +0000 Subject: [PATCH] chore: tidy .gitignore and the retag workflow - .gitignore: result.txt has not been written since the report moved to the job summary; ignore the pytest, ruff and mypy caches instead. - retag.yml: drop the branches filter on the release trigger, which GitHub does not apply to release events, and fold the two retag steps into one: a release still moves v2, a manual run the tag it names. --- .github/workflows/retag.yml | 14 +++----------- .gitignore | 4 +++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/retag.yml b/.github/workflows/retag.yml index 71c6415..1348dbd 100644 --- a/.github/workflows/retag.yml +++ b/.github/workflows/retag.yml @@ -4,7 +4,6 @@ permissions: on: release: - branches: [main] types: [released] workflow_dispatch: inputs: @@ -29,19 +28,12 @@ jobs: run: | git config user.name 'github-actions' git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - - name: Update tag with parameter - if: github.event.inputs.tag != '' + - name: Move the tag env: - TAG: ${{ inputs.tag }} + # A release moves v2; a manual run moves the tag it names. + TAG: ${{ inputs.tag || 'v2' }} run: | git tag --delete "$TAG" || true git push --delete origin "$TAG" || true git tag -a "$TAG" -m "Retag $TAG" git push origin "$TAG" - - name: Update tag to v2 - if: github.event.inputs.tag == '' - run: | - git tag --delete v2 || true - git push --delete origin v2 || true - git tag -a v2 -m 'Retag v2' - git push origin v2 diff --git a/.gitignore b/.gitignore index f840b9c..eb37486 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ venv/ .venv/ __pycache__/ -result.txt +.pytest_cache/ +.ruff_cache/ +.mypy_cache/ # pytest-cov .coverage