Browse Source

add runtimeconfig.json into release

pull/2895/head
Student Main 5 years ago
parent
commit
a29b618d99
1 changed files with 17 additions and 29 deletions
  1. +17
    -29
      appveyor.yml

+ 17
- 29
appveyor.yml View File

@@ -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:


Loading…
Cancel
Save