修正ci拉取代码步骤。
All checks were successful
Release tag / build (push) Successful in 2m53s

This commit is contained in:
amass 2024-11-14 12:15:48 +08:00
parent d6a36c0450
commit d0966cfcc7

View File

@ -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