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