From 4122701468de67e7e0e8e11440b39ee3dd79154f Mon Sep 17 00:00:00 2001 From: yeongpin Date: Sat, 8 Feb 2025 23:07:23 +0800 Subject: [PATCH] test2 --- .github/workflows/build.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54e17b6..a2e7acd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,10 +18,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 # 获取所有标签 + + - name: Delete existing tag if exists + run: | + if git ls-remote --tags origin | grep -q "refs/tags/v${{ github.event.inputs.version }}"; then + git push origin --delete "v${{ github.event.inputs.version }}" || true + git tag -d "v${{ github.event.inputs.version }}" || true + fi + - name: Create Tag run: | - git tag v${{ github.event.inputs.version }} - git push origin v${{ github.event.inputs.version }} + git tag "v${{ github.event.inputs.version }}" + git push origin "v${{ github.event.inputs.version }}" build-windows: needs: create-tag