Skip to content

Commit 09da3bc

Browse files
fix(ci): build failed on Windows
1 parent 8cb3e05 commit 09da3bc

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

.github/workflows/windows-qt6.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,29 +92,28 @@ jobs:
9292
shell: pwsh
9393
run: |
9494
# 创建文件夹
95-
New-Item -ItemType Directory ${env:archiveName}
95+
New-Item -ItemType Directory ${{ env.archiveName }}
9696
# 拷贝exe
97-
Copy-Item ${env:targetName} ${env:archiveName}\
97+
Copy-Item ${{ env.targetName }} ${{ env.archiveName}}\
9898
# 拷贝依赖
99-
windeployqt --qmldir . ${env:archiveName}\${env:targetName}
99+
windeployqt --qmldir . ${{ env.archiveName }}\${{ env.targetName }}
100100
# 打包zip
101-
Compress-Archive -Path ${env:archiveName} ${env:archiveName}'.zip'
102-
# 记录环境变量packageName给后续step
103-
$name = ${env:archiveName}
104-
echo "packageName=\"$name\"" >> $GITHUB_ENV
105-
# 打印环境变量packageName
106-
Write-Host 'packageName:'${env:packageName}
101+
Compress-Archive -Path ${{ env.archiveName }} ${{ env.archiveName }}'.zip'
107102
- name: Upload artifact
108103
uses: actions/upload-artifact@v2-preview
104+
env:
105+
archiveName: lemon.${{ steps.get_version.outputs.VERSION }}.Windows-${{ matrix.arch }}
109106
with:
110107
name: lemon-win-qt6-x64-${{ matrix.build_type }}.zip
111-
path: ${{ env.packageName }}.zip
108+
path: ${{ env.archiveName }}.zip
112109
- name: uploadRelease
113110
if: startsWith(github.event.ref, 'refs/tags/')
114111
uses: svenstaro/upload-release-action@v1-release
112+
env:
113+
archiveName: lemon.${{ steps.get_version.outputs.VERSION }}.Windows-${{ matrix.arch }}
115114
with:
116115
repo_token: ${{ secrets.GITHUB_TOKEN }}
117-
file: ./${{ env.packageName }}.zip
116+
file: ./${{ env.archiveName }}.zip
118117
asset_name: lemon-win-qt6-x64-${{ matrix.build_type }}.zip
119118
tag: ${{ github.ref }}
120119
overwrite: true

.github/workflows/windows.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ jobs:
107107
- name: uploadRelease
108108
if: startsWith(github.event.ref, 'refs/tags/')
109109
uses: svenstaro/upload-release-action@v1-release
110+
env:
111+
archiveName: lemon.${{ steps.get_version.outputs.VERSION }}.Windows-${{ matrix.arch }}
110112
with:
111113
repo_token: ${{ secrets.GITHUB_TOKEN }}
112-
file: ./${{ env.packageName }}.zip
114+
file: ./${{ env.archiveName }}.zip
113115
asset_name: lemon-win-${{matrix.arch}}-${{ matrix.build_type }}.zip
114116
tag: ${{ github.ref }}
115117
overwrite: true

makespec/BUILDVERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
118
1+
119

0 commit comments

Comments
 (0)