Refactor sign.ps1: Update artifact download and signing process

This commit is contained in:
Mauro Baladés
2024-10-15 20:24:36 +03:00
committed by mr. m 🤙
parent 38abd9e756
commit d68429b49b

View File

@@ -10,8 +10,10 @@ git pull --recurse-submodules
mkdir windsign-temp -ErrorAction SilentlyContinue
# Download in parallel
gh run download $GithubRunId --name windows-x64-obj-specific -p windsign-temp\windows-x64-obj-specific
gh run download $GithubRunId --name windows-x64-obj-generic -p windsign-temp\windows-x64-obj-generic
gh run download $GithubRunId --name windows-x64-obj-specific -D windsign-temp\windows-x64-obj-specific
echo "Downloaded specific artifacts"
gh run download $GithubRunId --name windows-x64-obj-generic -D windsign-temp\windows-x64-obj-generic
echo "Downloaded generic artifacts"
mkdir engine\obj-x86_64-pc-windows-msvc\ -ErrorAction SilentlyContinue
mkdir .\.github\workflows\object\ -ErrorAction SilentlyContinue
@@ -29,7 +31,7 @@ function SignAndPackage($name) {
$files = Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.exe
$files += Get-ChildItem engine\obj-x86_64-pc-windows-msvc\ -Recurse -Include *.dll
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files /ph
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
echo "Packaging $name"
$env:SURFER_SIGNING_MODE="sign"
$env:MAR="$PWD\\build\\winsign\\mar.exe"
@@ -76,7 +78,7 @@ function SignAndPackage($name) {
rm windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
$files = Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.exe
$files += Get-ChildItem windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -Include *.dll
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files /ph
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
Compress-Archive -Path windsign-temp\windows-x64-signed-$name\zen.win-$name -DestinationPath windsign-temp\windows-x64-signed-$name\zen.win-$name.zip
rmdir windsign-temp\windows-x64-signed-$name\zen.win-$name -Recurse -ErrorAction SilentlyContinue