From e20cbb5c5251cd2fa19fc93477af79c8c5376f72 Mon Sep 17 00:00:00 2001 From: Michael Scrivo <275524+mscrivo@users.noreply.github.com> Date: Sun, 3 Nov 2024 16:26:31 -0500 Subject: [PATCH] chore(tooling): migrate to github actions (#253) * Test action for building * set pre-release flag * try forcing version * no need for msbuild * Fix warning during build * Fixes * rename * Add inno build step * Add incrementing versions * fix var * another try * try as separate flags * cleanup * Finish up --- .github/workflows/dotnet-desktop.yml | 70 ++++++++++++++++++++++++++++ NetSparkle | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dotnet-desktop.yml diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml new file mode 100644 index 0000000..d520631 --- /dev/null +++ b/.github/workflows/dotnet-desktop.yml @@ -0,0 +1,70 @@ +name: Build and Sign + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + strategy: + matrix: + configuration: [Release] + + runs-on: windows-latest + + env: + VERSION: '4.3.${{ github.run_number }}' + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'true' + fetch-depth: 0 + + - name: Install .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Build the app + run: dotnet build --configuration $env:Configuration -p:Version=${{ env.VERSION }} -p:FileVersion=${{ env.VERSION }} + env: + Configuration: ${{ matrix.configuration }} + + - name: Sign App Files + uses: GabrielAcostaEngler/signtool-code-sign@1.0.6 + with: + certificate: '${{ secrets.BASE64_ENCODED_PFX }}' + cert-password: '${{ secrets.PFX_PASSWORD }}' + cert-sha1: '${{ secrets.CERT_HASH_SHA1 }}' + # path to folder containing files to sign. + folder: 'OotD.Launcher\bin\Release\net9.0-windows7.0' + recursive: true + timestamp-server: 'http://timestamp.digicert.com' + + - name: Build Installer + uses: Minionguyjpro/Inno-Setup-Action@v1.2.5 + with: + path: "Setup Script.iss" + options: /O+ + + - name: Sign Installer + uses: GabrielAcostaEngler/signtool-code-sign@1.0.6 + with: + certificate: '${{ secrets.BASE64_ENCODED_PFX }}' + cert-password: '${{ secrets.PFX_PASSWORD }}' + cert-sha1: '${{ secrets.CERT_HASH_SHA1 }}' + # path to folder containing files to sign. + folder: 'ServerStaging' + recursive: false + timestamp-server: 'http://timestamp.digicert.com' + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: Installer + path: ServerStaging diff --git a/NetSparkle b/NetSparkle index 40ae910..d454ee8 160000 --- a/NetSparkle +++ b/NetSparkle @@ -1 +1 @@ -Subproject commit 40ae910bf45c38046d829064ee11bcfe89b41fbc +Subproject commit d454ee84158708e03f1bd978f1ca7988d9e28bd8