From d0966cfcc7fbdc76ff7dc13974636aa8a72e536b Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Thu, 14 Nov 2024 12:15:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3ci=E6=8B=89=E5=8F=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=AD=A5=E9=AA=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release_windows.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release_windows.yaml b/.gitea/workflows/release_windows.yaml index ed98329..b1d4986 100644 --- a/.gitea/workflows/release_windows.yaml +++ b/.gitea/workflows/release_windows.yaml @@ -8,8 +8,18 @@ jobs: build: runs-on: [windows11] steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Clone repository + run: | + $ref = "${{ github.ref }}" + if ($ref -like 'refs/heads/*') { + $branch = $ref -replace '^refs/heads/', '' + } elseif ($ref -like 'refs/tags/*') { + $branch = $ref -replace '^refs/tags/', '' + } else { + $branch = $ref + } + git clone --depth 1 --branch=$branch https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_PASSWORD }}@amass.fun/gitea/${{ gitea.repository }}.git . + git checkout ${{ github.sha }} - name: Build and deploy run: | resources/build.ps1 build