Workflows and Script: Optimize the workflow.
This commit is contained in:
parent
a1084d5976
commit
5e97c6696d
|
@ -304,7 +304,7 @@ jobs:
|
|||
archiveName: ${{ env.APP_NAME }}_${{ env.QT_ARCH_WIN_MINGW }}_Qt${{ env.QT_VERSION }}_shared_${{ env.RELEASE_OR_NIGHTLY }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe
|
||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||
$name = ${env:archiveName}
|
||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||
|
||||
|
@ -360,7 +360,7 @@ jobs:
|
|||
archiveName: ${{ env.APP_NAME }}_${{ env.QT_ARCH_WIN_MINGW }}_Qt${{ env.QT_VERSION }}_static_${{ env.RELEASE_OR_NIGHTLY }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe
|
||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||
$name = ${env:archiveName}
|
||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||
|
||||
|
@ -422,7 +422,7 @@ jobs:
|
|||
msvcArch: ${{ env.QT_MSVC_ARCH }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
& scripts\windows-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe
|
||||
& scripts\windows-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||
$name = ${env:archiveName}
|
||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||
|
||||
|
@ -484,7 +484,7 @@ jobs:
|
|||
msvcArch: ${{ env.QT_MSVC_ARCH }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
& scripts\windows-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe
|
||||
& scripts\windows-publish.ps1 ${env:archiveName} ${env:APP_NAME}.exe ${env:REPO_NAME}
|
||||
$name = ${env:archiveName}
|
||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
||||
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
[CmdletBinding()]
|
||||
param (
|
||||
[string] $archiveName, [string] $APP_NAME
|
||||
[string] $archiveName, [string] $APP_NAME, [string] $REPO_NAME
|
||||
)
|
||||
# 外部环境变量包括:
|
||||
# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
||||
|
||||
|
||||
# archiveName: 5.15.2-win64_mingw81
|
||||
|
||||
$scriptDir = $PSScriptRoot
|
||||
$currentDir = Get-Location
|
||||
|
@ -17,7 +12,7 @@ function Main() {
|
|||
|
||||
New-Item -ItemType Directory $archiveName
|
||||
# 拷贝exe
|
||||
Copy-Item D:\a\RibbonUI\RibbonUI\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
||||
Copy-Item D:\a\$REPO_NAME\$REPO_NAME\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
||||
# 拷贝依赖
|
||||
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$APP_NAME
|
||||
# 删除不必要的文件
|
||||
|
@ -27,8 +22,8 @@ function Main() {
|
|||
Compress-Archive -Path $archiveName $archiveName'.zip'
|
||||
}
|
||||
|
||||
if ($null -eq $archiveName || $null -eq $APP_NAME) {
|
||||
Write-Host "args missing, archiveName is" $archiveName ", APP_NAME is" $APP_NAME
|
||||
if ($null -eq $archiveName || $null -eq $APP_NAME || $null -eq $REPO_NAME) {
|
||||
Write-Host "args missing, archiveName is" $archiveName ", APP_NAME is" $APP_NAME ", REPO_NAME is" $REPO_NAME
|
||||
return
|
||||
}
|
||||
Main
|
||||
|
|
|
@ -1,22 +1,7 @@
|
|||
[CmdletBinding()]
|
||||
param (
|
||||
[string] $archiveName, [string] $APP_NAME
|
||||
[string] $archiveName, [string] $APP_NAME, [string] $REPO_NAME
|
||||
)
|
||||
# 外部环境变量包括:
|
||||
# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
||||
# winSdkDir: ${{ steps.build.outputs.winSdkDir }}
|
||||
# winSdkVer: ${{ steps.build.outputs.winSdkVer }}
|
||||
# vcToolsInstallDir: ${{ steps.build.outputs.vcToolsInstallDir }}
|
||||
# vcToolsRedistDir: ${{ steps.build.outputs.vcToolsRedistDir }}
|
||||
# msvcArch: ${{ matrix.msvc_arch }}
|
||||
|
||||
|
||||
# winSdkDir: C:\Program Files (x86)\Windows Kits\10\
|
||||
# winSdkVer: 10.0.19041.0\
|
||||
# vcToolsInstallDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29333\
|
||||
# vcToolsRedistDir: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.28.29325\
|
||||
# archiveName: 5.9.9-win32_msvc2015
|
||||
# msvcArch: x86
|
||||
|
||||
$scriptDir = $PSScriptRoot
|
||||
$currentDir = Get-Location
|
||||
|
@ -27,7 +12,7 @@ function Main() {
|
|||
|
||||
New-Item -ItemType Directory $archiveName
|
||||
# 拷贝exe
|
||||
Copy-Item D:\a\RibbonUI\RibbonUI\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
||||
Copy-Item D:\a\$REPO_NAME\$REPO_NAME\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
||||
# 拷贝依赖
|
||||
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$APP_NAME
|
||||
# 删除不必要的文件
|
||||
|
@ -43,8 +28,8 @@ function Main() {
|
|||
Compress-Archive -Path $archiveName $archiveName'.zip'
|
||||
}
|
||||
|
||||
if ($null -eq $archiveName || $null -eq $APP_NAME) {
|
||||
Write-Host "args missing, archiveName is" $archiveName ", APP_NAME is" $APP_NAME
|
||||
if ($null -eq $archiveName || $null -eq $APP_NAME || $null -eq $REPO_NAME) {
|
||||
Write-Host "args missing, archiveName is" $archiveName ", APP_NAME is" $APP_NAME ", REPO_NAME is" $REPO_NAME
|
||||
return
|
||||
}
|
||||
Main
|
||||
|
|
Loading…
Reference in New Issue