diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1afb3c9..f930c90 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -143,8 +143,16 @@ jobs: git checkout ${{ github.ref }} - name: 设置版本 - run: powershell -Command "if ('${{ github.event_name }}' -eq 'workflow_dispatch') { $VERSION = '${{ inputs.version }}' } else { $VERSION = '${{ github.ref }}' -replace 'refs/tags/', '' }; Write-Host '构建版本: $VERSION'; echo \"VERSION=$VERSION\" >> $env:GITHUB_ENV" - + run: | + powershell -Command " + if ('${{ github.event_name }}' -eq 'workflow_dispatch') { + `$VERSION = '${{ inputs.version }}' + } else { + `$VERSION = '${{ github.ref }}' -replace 'refs/tags/', '' + } + Write-Host \"构建版本: `$VERSION\" + echo \"VERSION=`$VERSION\" >> `$env:GITHUB_ENV + " - name: 构建项目 (Windows Native) run: | powershell -Command "