mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Remove 7z; Also remove MacOS code signing from CI
This commit is contained in:
80
.github/workflows/build.yml
vendored
80
.github/workflows/build.yml
vendored
@@ -27,80 +27,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: packages
|
name: packages
|
||||||
path: .\build\Release\*.nupkg
|
path: .\build\Release\*.nupkg
|
||||||
|
- name: Publish to GitHub Packages
|
||||||
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
shell: pwsh
|
||||||
package-macos:
|
|
||||||
name: Sign OSX
|
|
||||||
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }}
|
|
||||||
runs-on: macos-latest
|
|
||||||
needs: [ build-windows ]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup .NET
|
|
||||||
uses: actions/setup-dotnet@v1
|
|
||||||
with:
|
|
||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
||||||
- name: Install NGBV
|
|
||||||
run: dotnet tool install --tool-path . nbgv
|
|
||||||
- name: Download Artifacts
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: packages
|
|
||||||
- name: Extract Artifacts
|
|
||||||
run: |
|
run: |
|
||||||
unzip Clowd.Squirrel*.nupkg -d ./squirrel/
|
nuget push csq.*.nupkg -ApiKey ${{ secrets.GITHUB_TOKEN }} -Source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -SkipDuplicate
|
||||||
unzip csq*.nupkg -d ./csq/
|
nuget push Clowd.Squirrel.*.nupkg -ApiKey ${{ secrets.GITHUB_TOKEN }} -Source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -SkipDuplicate
|
||||||
- name: Install mitchellh/gon
|
|
||||||
run: brew install mitchellh/gon/gon
|
|
||||||
- name: Install Apple Certificate
|
|
||||||
env:
|
|
||||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
|
||||||
P12_PASSWORD: ${{ secrets.APPLE_BUILD_CERTIFICATE_PASSWORD }}
|
|
||||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
# write certificate to file
|
|
||||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
|
||||||
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
|
|
||||||
|
|
||||||
# create temporary keychain
|
|
||||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
|
||||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
|
||||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
|
||||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
|
||||||
|
|
||||||
# import certificate to keychain
|
|
||||||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
|
||||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
|
||||||
- name: Sign and Notarize
|
|
||||||
env:
|
|
||||||
AC_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
|
|
||||||
AC_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
|
|
||||||
run: gon ./gon.config.json
|
|
||||||
- name: Clean up KeyChain
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
|
||||||
- name: Fix Packages
|
|
||||||
run: |
|
|
||||||
export NUGET_VERSION=$(./nbgv get-version -f json | python3 -c "import sys, json; print(json.load(sys.stdin)['NuGetPackageVersion'])")
|
|
||||||
echo $NUGET_VERSION
|
|
||||||
unzip ./signed.zip -d ./bsigned/
|
|
||||||
cp ./bsigned/UpdateMac ./squirrel/tools/
|
|
||||||
cp ./bsigned/UpdateMac ./csq/tools/net6.0/any/
|
|
||||||
cp ./bsigned/7zz ./squirrel/tools/
|
|
||||||
cp ./bsigned/7zz ./csq/tools/net6.0/any/
|
|
||||||
rm -rf *.nupkg
|
|
||||||
chmod 755 ./vendor/7zz
|
|
||||||
./vendor/7zz a csq.${NUGET_VERSION}.nupkg -tzip -mx9 "${GITHUB_WORKSPACE}/csq/*"
|
|
||||||
./vendor/7zz a Clowd.Squirrel.${NUGET_VERSION}.nupkg -tzip -mx9 "${GITHUB_WORKSPACE}/squirrel/*"
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: packages-final
|
|
||||||
path: "*.nupkg"
|
|
||||||
- name: Publish Dev NuGet Package
|
|
||||||
run: |
|
|
||||||
export NUGET_VERSION=$(./nbgv get-version -f json | python3 -c "import sys, json; print(json.load(sys.stdin)['NuGetPackageVersion'])")
|
|
||||||
nuget push csq.${NUGET_VERSION}.nupkg -ApiKey ${{ secrets.GITHUB_TOKEN }} -Source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -SkipDuplicate
|
|
||||||
nuget push Clowd.Squirrel.${NUGET_VERSION}.nupkg -ApiKey ${{ secrets.GITHUB_TOKEN }} -Source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -SkipDuplicate
|
|
||||||
@@ -18,7 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionLevel", "SolutionLe
|
|||||||
.github\workflows\build.yml = .github\workflows\build.yml
|
.github\workflows\build.yml = .github\workflows\build.yml
|
||||||
build.ps1 = build.ps1
|
build.ps1 = build.ps1
|
||||||
Squirrel.entitlements = Squirrel.entitlements
|
Squirrel.entitlements = Squirrel.entitlements
|
||||||
gon.config.json = gon.config.json
|
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Setup", "src\Setup\Setup.vcxproj", "{6B406985-B2E1-4FED-A405-BD0694D68E93}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Setup", "src\Setup\Setup.vcxproj", "{6B406985-B2E1-4FED-A405-BD0694D68E93}"
|
||||||
|
|||||||
@@ -45,7 +45,14 @@ dotnet publish -v minimal --no-build -c Release --self-contained "$PSScriptRoot\
|
|||||||
dotnet publish -v minimal --no-build -c Release --self-contained "$PSScriptRoot\src\Update.OSX\Update.OSX.csproj" -o "$ToolsDir"
|
dotnet publish -v minimal --no-build -c Release --self-contained "$PSScriptRoot\src\Update.OSX\Update.OSX.csproj" -o "$ToolsDir"
|
||||||
|
|
||||||
Write-Host "Copying Tools" -ForegroundColor Magenta
|
Write-Host "Copying Tools" -ForegroundColor Magenta
|
||||||
|
# First, copy all the tools into the 'csq' package
|
||||||
|
Copy-Item -Path "$PSScriptRoot\vendor\*" -Destination $ToolsDir -Recurse
|
||||||
|
Copy-Item -Path "Win32\*" -Destination $ToolsDir
|
||||||
Copy-Item -Path "$PSScriptRoot\Squirrel.entitlements" -Destination "$ToolsDir"
|
Copy-Item -Path "$PSScriptRoot\Squirrel.entitlements" -Destination "$ToolsDir"
|
||||||
|
Remove-Item "$ToolsDir\*.pdb"
|
||||||
|
Remove-Item "$ToolsDir\7za.exe"
|
||||||
|
|
||||||
|
# Second, copy all the csq files into the 'squirrel' package
|
||||||
New-Item -Path "squirrel" -Name "tools" -ItemType "directory"
|
New-Item -Path "squirrel" -Name "tools" -ItemType "directory"
|
||||||
Copy-Item -Path "$ToolsDir\*" -Destination "squirrel\tools" -Recurse
|
Copy-Item -Path "$ToolsDir\*" -Destination "squirrel\tools" -Recurse
|
||||||
Remove-Item "squirrel\tools\*.xml"
|
Remove-Item "squirrel\tools\*.xml"
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"source": [
|
|
||||||
"./squirrel/tools/UpdateMac",
|
|
||||||
"./squirrel/tools/7zz"
|
|
||||||
],
|
|
||||||
"bundle_id": "com.caesay.squirrel",
|
|
||||||
"sign": {
|
|
||||||
"application_identity": "Developer ID Application: Caelan Sayler",
|
|
||||||
"entitlements_file": "Squirrel.entitlements"
|
|
||||||
},
|
|
||||||
"zip": {
|
|
||||||
"output_path": "signed.zip"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -163,7 +163,7 @@ namespace Squirrel.CommandLine
|
|||||||
printProcessed(newLibFiles.Length, baseLibFiles.Count);
|
printProcessed(newLibFiles.Length, baseLibFiles.Count);
|
||||||
|
|
||||||
ReleasePackageBuilder.addDeltaFilesToContentTypes(tempInfo.FullName);
|
ReleasePackageBuilder.addDeltaFilesToContentTypes(tempInfo.FullName);
|
||||||
HelperFile.CompressLzma7z(outputFile, tempInfo.FullName);
|
EasyZip.CreateZipFromDirectory(outputFile, tempInfo.FullName);
|
||||||
|
|
||||||
this.Log().Info(
|
this.Log().Info(
|
||||||
$"Successfully created delta package for {basePackage.Version} -> {newPackage.Version}" +
|
$"Successfully created delta package for {basePackage.Version} -> {newPackage.Version}" +
|
||||||
|
|||||||
@@ -13,19 +13,13 @@ namespace Squirrel.CommandLine
|
|||||||
{
|
{
|
||||||
internal class HelperFile
|
internal class HelperFile
|
||||||
{
|
{
|
||||||
private static string SevenZipPath {
|
|
||||||
get {
|
|
||||||
if (SquirrelRuntimeInfo.IsWindows) return FindHelperFile("7za.exe");
|
|
||||||
if (SquirrelRuntimeInfo.IsOSX) return FindHelperFile("7zz");
|
|
||||||
throw new NotImplementedException("Unsupported OS");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<string> _searchPaths = new List<string>();
|
private static List<string> _searchPaths = new List<string>();
|
||||||
protected static IFullLogger Log = SquirrelLocator.CurrentMutable.GetService<ILogManager>().GetLogger(typeof(HelperFile));
|
protected static IFullLogger Log = SquirrelLocator.CurrentMutable.GetService<ILogManager>().GetLogger(typeof(HelperFile));
|
||||||
|
|
||||||
static HelperFile()
|
static HelperFile()
|
||||||
{
|
{
|
||||||
|
AddSearchPath(SquirrelRuntimeInfo.BaseDirectory, "wix");
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
AddSearchPath(SquirrelRuntimeInfo.BaseDirectory, "..", "..", "..", "build", "publish");
|
AddSearchPath(SquirrelRuntimeInfo.BaseDirectory, "..", "..", "..", "build", "publish");
|
||||||
AddSearchPath(SquirrelRuntimeInfo.BaseDirectory, "..", "..", "..", "build", "Release", "squirrel", "tools");
|
AddSearchPath(SquirrelRuntimeInfo.BaseDirectory, "..", "..", "..", "build", "Release", "squirrel", "tools");
|
||||||
@@ -93,13 +87,6 @@ namespace Squirrel.CommandLine
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void CompressLzma7z(string zipFilePath, string inFolder)
|
|
||||||
{
|
|
||||||
Log.Info($"Compressing '{inFolder}' to '{zipFilePath}' using 7z (LZMA)...");
|
|
||||||
var args = new string[] { "a", zipFilePath, "-tzip", "-m0=LZMA", "-aoa", "-y", "*" };
|
|
||||||
InvokeAndThrowIfNonZero(SevenZipPath, args, inFolder);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static string InvokeAndThrowIfNonZero(string exePath, IEnumerable<string> args, string workingDir)
|
protected static string InvokeAndThrowIfNonZero(string exePath, IEnumerable<string> args, string workingDir)
|
||||||
{
|
{
|
||||||
var result = PlatformUtil.InvokeProcess(exePath, args, workingDir, CancellationToken.None);
|
var result = PlatformUtil.InvokeProcess(exePath, args, workingDir, CancellationToken.None);
|
||||||
|
|||||||
@@ -99,11 +99,9 @@ namespace Squirrel.CommandLine
|
|||||||
"The input package file {0} must have no dependencies.", InputPackageFile));
|
"The input package file {0} must have no dependencies.", InputPackageFile));
|
||||||
}
|
}
|
||||||
|
|
||||||
//var targetFramework = frameworks.Single();
|
|
||||||
|
|
||||||
this.Log().Info("Creating release package: {0} => {1}", InputPackageFile, outputFile);
|
this.Log().Info("Creating release package: {0} => {1}", InputPackageFile, outputFile);
|
||||||
|
|
||||||
|
|
||||||
using (Utility.GetTempDirectory(out var tempPath)) {
|
using (Utility.GetTempDirectory(out var tempPath)) {
|
||||||
var tempDir = new DirectoryInfo(tempPath);
|
var tempDir = new DirectoryInfo(tempPath);
|
||||||
|
|
||||||
@@ -122,7 +120,7 @@ namespace Squirrel.CommandLine
|
|||||||
|
|
||||||
contentsPostProcessHook?.Invoke(tempPath, package);
|
contentsPostProcessHook?.Invoke(tempPath, package);
|
||||||
|
|
||||||
HelperFile.CompressLzma7z(outputFile, tempPath);
|
EasyZip.CreateZipFromDirectory(outputFile, tempPath);
|
||||||
|
|
||||||
ReleasePackageFile = outputFile;
|
ReleasePackageFile = outputFile;
|
||||||
return ReleasePackageFile;
|
return ReleasePackageFile;
|
||||||
|
|||||||
@@ -13,14 +13,9 @@
|
|||||||
<PackAsTool>true</PackAsTool>
|
<PackAsTool>true</PackAsTool>
|
||||||
<Description>A .NET Core Tool that uses the Squirrel framework to create installers and update packages for dotnet applications.</Description>
|
<Description>A .NET Core Tool that uses the Squirrel framework to create installers and update packages for dotnet applications.</Description>
|
||||||
<PackageIcon>Clowd_200.png</PackageIcon>
|
<PackageIcon>Clowd_200.png</PackageIcon>
|
||||||
<PackageVendor>tools\net6.0\any\</PackageVendor>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\vendor\wix\*" Pack="true" PackagePath="$(PackageVendor)" />
|
|
||||||
<None Include="..\..\vendor\*" Pack="true" PackagePath="$(PackageVendor)" />
|
|
||||||
<None Include="..\..\build\$(Configuration)\Win32\Setup.exe" Pack="true" PackagePath="$(PackageVendor)" />
|
|
||||||
<None Include="..\..\build\$(Configuration)\Win32\StubExecutable.exe" Pack="true" PackagePath="$(PackageVendor)" />
|
|
||||||
<None Include="..\..\docs\artwork\Clowd_200.png" Pack="true" PackagePath="\" />
|
<None Include="..\..\docs\artwork\Clowd_200.png" Pack="true" PackagePath="\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
BIN
vendor/7zz
vendored
BIN
vendor/7zz
vendored
Binary file not shown.
Reference in New Issue
Block a user