diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87bd373..af40cc6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,8 +37,11 @@ build-windows: - cmake --build build --config "$CMAKE_BUILD_TYPE" - Write-Host "package windows start..." - cd "build/bin" - - $QT_PATH\bin\windeployqt.exe .\OneLevelXmlOpr.exe - - Compress-Archive -Path *.exe, *.dll -DestinationPath "$PROJECT_NAME-v$PROJECT_VERSION-win-$ARCH_TYPE.zip" -Recurse + # 修复1: 使用引号包裹路径,避免反斜杠被解释 + - & "${QT_PATH}\bin\windeployqt.exe" "OneLevelXmlOpr.exe" + # 修复2: 去掉 -Recurse 参数,或者使用正确的递归方法 + - $files = Get-ChildItem -Filter "*.exe", "*.dll" + - Compress-Archive -Path $files -DestinationPath "$PROJECT_NAME-v$PROJECT_VERSION-win-$ARCH_TYPE.zip" artifacts: paths: - build/bin/$PROJECT_NAME-v$PROJECT_VERSION-win-$ARCH_TYPE.zip