forked from PuqiAR/Fig-TreeWalker
[CI] win 设置版本
This commit is contained in:
@@ -143,15 +143,7 @@ jobs:
|
|||||||
git checkout ${{ github.ref }}
|
git checkout ${{ github.ref }}
|
||||||
|
|
||||||
- name: 设置版本
|
- name: 设置版本
|
||||||
run: |
|
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"
|
||||||
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
|
|
||||||
|
|
||||||
- name: 构建项目 (Windows Native)
|
- name: 构建项目 (Windows Native)
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user