diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 3355cef..1afb3c9 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -143,15 +143,7 @@ jobs: git checkout ${{ github.ref }} - name: 设置版本 - run: | - if ('${{ github.event_name }}' -eq 'workflow_dispatch') { - $VERSION = '${{ inputs.version }}' - } else { - $VERSION = '${{ github.ref }}' -replace 'refs/tags/', '' - } - Write-Host "构建版本: $VERSION" - # Gitea Actions 设置环境变量的正确方式 - 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: |