Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jared2020 committed Dec 18, 2020
1 parent 54db3b9 commit 32a9c76
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
# 上传artifacts
- uses: actions/upload-artifact@v2
with:
name: ${targetName}.zip
name: ${targetName}-${{matrix.qt_ver}}.zip
path: bin/release/${targetName}.app
# tag 上传Release
- name: uploadRelease
Expand Down
32 changes: 17 additions & 15 deletions scripts/windows-publish.ps1
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
$scriptDir=$PSScriptRoot
$currentDir=Get-Location
[CmdletBinding()]
param (
[string] $archiveName, [string] $targetName
)


$scriptDir = $PSScriptRoot
$currentDir = Get-Location
Write-Host "currentDir" $currentDir
Write-Host "scriptDir" $scriptDir


function Main() {
if ($args.Length -le 1 ) {
Write-Host "args missing, need at last 2, real " $args.Length
return
}

[string]$archiveName=$args[0]
[string]$targetName=$args[1]

New-Item -ItemType Directory $archiveName
# 拷贝exe
Copy-Item bin\release\$targetName $archiveName\
Copy-Item bin\release\Trans $archiveName\Trans -Recurse
# 拷贝依赖
windeployqt --qmldir . $archiveName\$targetName
# 删除不必要的库
#$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
#Remove-Item -Path Qml -Include $excludeList -Recurse -Force
windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName
# 删除不必要的文件
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
# 打包zip
Compress-Archive -Path $archiveName $archiveName'.zip'
}

Main $args
if ($null -eq $archiveName || $null -eq $targetName) {
Write-Host "args missing, archiveName is" $archiveName ", targetName is" $targetName
return
}
Main


0 comments on commit 32a9c76

Please sign in to comment.