[CI] windows ps 难搞捏

This commit is contained in:
2026-01-03 22:22:09 +08:00
parent 6fc0fd7f49
commit 227c156942

View File

@@ -31,13 +31,14 @@ jobs:
- name: 设置版本 - name: 设置版本
run: | run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then if ('${{ github.event_name }}' -eq 'workflow_dispatch') {
VERSION="${{ inputs.version }}" $VERSION = '${{ inputs.version }}'
else } else {
VERSION="${GITHUB_REF#refs/tags/}" $VERSION = '${{ github.ref }}' -replace 'refs/tags/', ''
fi }
echo "构建版本: $VERSION" Write-Host "构建版本: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV # Gitea Actions 设置环境变量的正确方式
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
- name: 构建项目 (Linux) - name: 构建项目 (Linux)
run: | run: |