mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
I don't know, hopefully this will work one day
This commit is contained in:
106
.github/workflows/build.yml
vendored
106
.github/workflows/build.yml
vendored
@@ -44,8 +44,15 @@ jobs:
|
|||||||
- name: Upload Windows Artifacts
|
- name: Upload Windows Artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: windows-tools
|
name: windows-build
|
||||||
path: .\build\publish\*
|
path: .\build\*
|
||||||
|
- name: Bundle Tools
|
||||||
|
run: .\vendor\7zip\7z.exe a squirrel-win-x64.zip -tzip -aoa -y -mmt build\publish\*
|
||||||
|
- name: Upload Tools
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: tools
|
||||||
|
path: squirrel-win-x64.zip
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
name: Build OSX
|
name: Build OSX
|
||||||
@@ -59,37 +66,24 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
- name: Build SquirrelMac
|
- name: Build SquirrelMac
|
||||||
run: dotnet publish -v minimal --self-contained -c Release -r osx.10.12-x64 ./src/Squirrel.CommandLine.OSX/Squirrel.CommandLine.OSX.csproj -o ./publish
|
run: dotnet publish -v minimal --self-contained -c Release -r osx.10.12-x64 ./src/Squirrel.CommandLine.OSX/Squirrel.CommandLine.OSX.csproj -o ./publish
|
||||||
- name: Upload SquirrelMac
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: osx-tools
|
|
||||||
path: ./publish/SquirrelMac
|
|
||||||
- name: Build UpdateMac
|
- name: Build UpdateMac
|
||||||
run: dotnet publish -v minimal --self-contained -c Release -r osx.10.12-x64 ./src/Update.OSX/Update.OSX.csproj -o ./publish
|
run: dotnet publish -v minimal --self-contained -c Release -r osx.10.12-x64 ./src/Update.OSX/Update.OSX.csproj -o ./publish
|
||||||
- name: Upload UpdateMac
|
- name: Upload MacOS Artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: osx-tools
|
name: osx-build
|
||||||
path: ./publish/UpdateMac
|
path: ./publish/*
|
||||||
|
|
||||||
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
package-macos:
|
||||||
deploy:
|
name: Package OSX
|
||||||
name: "Deploy"
|
|
||||||
needs: [build-windows, build-macos]
|
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
needs: [build-macos]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Download MacOS Artifacts
|
||||||
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 all workflow artifacts
|
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: osx-build
|
||||||
- name: Install Apple Certificate
|
- name: Install Apple Certificate
|
||||||
env:
|
env:
|
||||||
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_BUILD_CERTIFICATE_BASE64 }}
|
||||||
@@ -109,28 +103,62 @@ jobs:
|
|||||||
# import certificate to keychain
|
# import certificate to keychain
|
||||||
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||||
- name: CodeSign Binaries
|
|
||||||
run: |
|
|
||||||
codesign --force --timestamp --options=runtime --keychain $KEYCHAIN_PATH --entitlements ./Squirrel.entitlements --sign "Developer ID Application: Caelan Sayler" ./osx-tools/SquirrelMac
|
|
||||||
codesign --force --timestamp --options=runtime --keychain $KEYCHAIN_PATH --entitlements ./Squirrel.entitlements --sign "Developer ID Application: Caelan Sayler" ./osx-tools/UpdateMac
|
|
||||||
- name: Bundle Tools
|
|
||||||
run: |
|
|
||||||
zip SquirrelTools.zip ./osx-tools/*
|
|
||||||
zip SquirrelTools.zip ./windows-tools/*
|
|
||||||
- name: Install mitchellh/gon
|
- name: Install mitchellh/gon
|
||||||
run: brew install mitchellh/gon/gon
|
run: brew install mitchellh/gon/gon
|
||||||
- name: Notarize Tools
|
- name: Bundle, Sign, and Notarize
|
||||||
env:
|
env:
|
||||||
AC_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
|
AC_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
|
||||||
AC_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
|
AC_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
|
||||||
run: gon ./gon.config.json
|
run: gon ./gon.config.json
|
||||||
- name: Clean up KeyChain
|
- name: Clean up KeyChain
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
run: |
|
run: security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
- name: Upload Tools
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tools
|
name: tools
|
||||||
path: ./SquirrelTools.*
|
path: squirrel-osx-x64.zip
|
||||||
|
|
||||||
|
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||||
|
deploy:
|
||||||
|
name: "Deploy"
|
||||||
|
needs: [build-windows, package-macos]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
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: Get NuGet Version
|
||||||
|
run: |
|
||||||
|
export NUGET_VERSION=$(nbgv get-version -f json | python3 -c "import sys, json; print(json.load(sys.stdin)['NuGetPackageVersion'])")
|
||||||
|
echo $NUGET_VERSION
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: tools
|
||||||
|
- name: Decompress artifacts
|
||||||
|
run: |
|
||||||
|
unzip ./tools/squirrel-osx-x64.zip -d ./build/publish
|
||||||
|
unzip ./tools/squirrel-win-x64.zip -d ./build/publish
|
||||||
|
ls -la ./build/publish
|
||||||
|
# - name: Upload Artifacts
|
||||||
|
# uses: actions/upload-artifact@v3
|
||||||
|
# with:
|
||||||
|
# name: tools
|
||||||
|
# path: ./SquirrelTools.*
|
||||||
|
|
||||||
|
|
||||||
|
# - name: CodeSign Binaries
|
||||||
|
# run: |
|
||||||
|
# codesign --force --timestamp --options=runtime --keychain $KEYCHAIN_PATH --entitlements ./Squirrel.entitlements --sign "Developer ID Application: Caelan Sayler" ./osx-tools/SquirrelMac
|
||||||
|
# codesign --force --timestamp --options=runtime --keychain $KEYCHAIN_PATH --entitlements ./Squirrel.entitlements --sign "Developer ID Application: Caelan Sayler" ./osx-tools/UpdateMac
|
||||||
|
# - name: Bundle Tools
|
||||||
|
# run: |
|
||||||
|
# zip SquirrelTools.zip ./osx-tools/*
|
||||||
|
# zip SquirrelTools.zip ./windows-tools/*
|
||||||
@@ -1,6 +1,14 @@
|
|||||||
{
|
{
|
||||||
"notarize": [{
|
"source": [
|
||||||
"path": "SquirrelTools.zip",
|
"./osx-tools/SquirrelMac",
|
||||||
"bundle_id": "com.caesay.squirrel"
|
"./osx-tools/UpdateMac"
|
||||||
}]
|
],
|
||||||
|
"bundle_id": "com.caesay.squirrel",
|
||||||
|
"sign": {
|
||||||
|
"application_identity": "Developer ID Application: Caelan Sayler",
|
||||||
|
"entitlements_file": "Squirrel.entitlements"
|
||||||
|
},
|
||||||
|
"zip": {
|
||||||
|
"output_path": "squirrel-osx-x64.zip"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user