From a29b618d998c0d92424ed261f18565b7cc04f9a9 Mon Sep 17 00:00:00 2001 From: Student Main Date: Tue, 5 May 2020 13:57:00 +0800 Subject: [PATCH] add runtimeconfig.json into release --- appveyor.yml | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index be3ebff4..0aca0dba 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -118,48 +118,36 @@ after_build: return $text } - $WorkingFolder = "$env:APPVEYOR_BUILD_FOLDER\working" $ExeFileName = "Shadowsocks-$env:APPVEYOR_BUILD_VERSION-$env:CONFIGURATION.exe" $DllFileName = "Shadowsocks.dll" $ExeFile = "$WorkingFolder\$DNVer\$ExeFileName" $DllFile = "$WorkingFolder\$DNVer\$DllFileName" - $ExeHashFile = "$Exefile.hash" - $DllHashFile = "$DllFile.hash" New-Item $WorkingFolder -ItemType Directory -Force Copy-Item $env:APPVEYOR_BUILD_FOLDER\shadowsocks-csharp\bin\$env:CONFIGURATION\netcoreapp3.1\Shadowsocks.exe $WorkingFolder\Shadowsocks.exe Copy-Item $env:APPVEYOR_BUILD_FOLDER\shadowsocks-csharp\bin\$env:CONFIGURATION\netcoreapp3.1\Shadowsocks.dll $WorkingFolder\Shadowsocks.dll + Copy-Item $env:APPVEYOR_BUILD_FOLDER\shadowsocks-csharp\bin\$env:CONFIGURATION\netcoreapp3.1\Shadowsocks.runtimeconfig.json $WorkingFolder\Shadowsocks.runtimeconfig.json Copy-Item $WorkingFolder\Shadowsocks.exe $ExeFile # Copy-Item $WorkingFolder\Shadowsocks.dll $DllFile - - CalculateHash -file $Exefile | Out-File -FilePath $ExeHashFile - CalculateHash -file $DllFile | Out-File -FilePath $DllHashFile - - Push-AppveyorArtifact $ExeFile - Push-AppveyorArtifact $ExeHashFile - + # Create and deploy the release zip - if ($env:configuration -eq 'Release') - { - $ReleaseFile = "$WorkingFolder\Shadowsocks.exe" - $ReleaseFile2 = "$WorkingFolder\Shadowsocks.dll" - $HashFile = "$ReleaseFile.hash" - $HashFile2 = "$ReleaseFile2.hash" - $ZipFile = "$WorkingFolder\Shadowsocks-$env:APPVEYOR_BUILD_VERSION.zip" - $ZipHashFile = "$ZipFile.hash" - # Calculate exe Hash and archieve both exe and hash to zip - CalculateHash -file $ReleaseFile | Out-File -FilePath $hashFile - 7z a $ZipFile $ReleaseFile - 7z a $ZipFile $ReleaseFile2 - 7z a $ZipFile $HashFile - 7z a $ZipFile $HashFile2 - Push-AppveyorArtifact $ZipFile - # Calculate zip Hash - CalculateHash -file $ZipFile | Out-File -FilePath $ZipHashFile - Push-AppveyorArtifact $ZipHashFile - } + $ReleaseFile = "$WorkingFolder\Shadowsocks.exe" + $ReleaseFile2 = "$WorkingFolder\Shadowsocks.dll" + $ReleaseFile3 = "$WorkingFolder\Shadowsocks.runtimeconfig.json" + $ZipFile = "$WorkingFolder\Shadowsocks-$env:APPVEYOR_BUILD_VERSION.zip" + $ZipHashFile = "$ZipFile.hash" + # Calculate exe Hash and archieve both exe and hash to zip + CalculateHash -file $ReleaseFile | Out-File -FilePath $hashFile + 7z a $ZipFile $ReleaseFile + 7z a $ZipFile $ReleaseFile2 + 7z a $ZipFile $ReleaseFile3 + Push-AppveyorArtifact $ZipFile + # Calculate zip Hash + CalculateHash -file $ZipFile | Out-File -FilePath $ZipHashFile + Push-AppveyorArtifact $ZipHashFile + # scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services) # before_package: