From 5b3043f0147110d0eab0973f5732fef73b9c56a7 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Wed, 17 Apr 2024 13:37:43 -0700 Subject: [PATCH 1/9] Update cd build to support signing of the .msi * Add workflow dispatch input * Update to latest overcrowdin version * Update generic installer to handle delayed signing * Build/upload/and sign the msi --- .github/workflows/ci-cd.yml | 81 ++++++++++++++----- build/FLExBridge.proj | 8 +- build/WixPatchableInstaller.targets | 41 ++++++++-- l10n/l10n.proj | 2 +- .../LibFLExBridge-ChorusPluginTests.csproj | 2 +- src/WiXInstaller | 2 +- 6 files changed, 99 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e240e658..f8f0adf0 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -5,15 +5,22 @@ on: pull_request: branches: ["develop", "master"] workflow_dispatch: + inputs: + releaseType: + description: 'Alpha, Beta, Stable used to stamp release artifacts' + required: true + default: 'Alpha' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: - windows_debug_build_and_test: + build_and_test: env: CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} + FILESTOSIGNLATER: "${{ github.workspace }}\\filesToSign" + teamcity_build_checkoutDir: ${{ github.workspace }} name: Build Debug and run Tests runs-on: windows-latest steps: @@ -38,35 +45,26 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 + # We need the dotnet runtime to execute overcrowdin - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: - dotnet-version: | - 2.1.x - 3.1.x - 5.0.x + dotnet-version: + 8.0.x if: github.event_name != 'pull_request' + # If we are just doing a CI build we don't need real localizations, but the location must exist - name: Add Fake Localizations for CI shell: bash run: echo > DistFiles/localizations/empty.xlf if: github.event_name == 'pull_request' - - - name: Restore Build Tasks & Packages - id: package_restore - shell: cmd - run: msbuild build\FLExBridge.proj /t:RestoreBuildTasks;RestorePackages - - - name: Build & Test - id: build_and_test - shell: cmd - run: msbuild build\FLExBridge.proj /t:Test - + - name: Install Latest Overcrowdin shell: cmd run: dotnet tool install -g overcrowdin if: github.event_name != 'pull_request' + - name: Restore L10n Packages shell: cmd run: | @@ -79,9 +77,50 @@ jobs: run: | cd l10n msbuild l10n.proj /t:GetLatestL10ns;CopyL10nsToDistFiles - if: github.event_name != 'pull_request' - - - name: Build Installer + if: github.event_name != 'pull_request' + + - name: Restore Build Tasks & Packages + id: package_restore shell: cmd - run: msbuild build/FLExBridge.proj /t:Installer /p:UploadFolder=Alpha + run: msbuild build\FLExBridge.proj /t:RestoreBuildTasks;RestorePackages + + - name: Build & Test + id: build_and_test_step + shell: cmd + run: msbuild build\FLExBridge.proj /t:Test /p:Configuration=Release + + # All the following are used only when building an installer after a merge + - name: Build Msi + id: build_msi + shell: cmd + run: | + msbuild build/FLExBridge.proj /t:CleanMasterOutputDir;PreparePublishingArtifactsInternal;BuildProductBaseMsi /p:UploadFolder=${{ inputs.environment || 'Alpha' }} if: github.event_name != 'pull_request' + + - name: Prepare for msi signing + shell: bash + run: | + echo "FILES_TO_SIGN=$(cat $FILESTOSIGNLATER)" >> $GITHUB_OUTPUT + id: gathered_files + if: github.event_name != 'pull_request' + + - name: upload-msi + id: upload + uses: actions/upload-artifact@v4 + with: + name: FlexBridge.msi + path: ${{ steps.gathered_files.outputs.FILES_TO_SIGN }} + if-no-files-found: error + overwrite: true + if: github.event_name != 'pull_request' + + sign-installer: + name: Sign FlexBridge Installer + needs: build_and_test + if: github.event_name != 'pull_request' + uses: sillsdev/codesign/.github/workflows/sign.yml@v2 + with: + artifact: FlexBridge.msi + secrets: + certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} + \ No newline at end of file diff --git a/build/FLExBridge.proj b/build/FLExBridge.proj index 45a19196..ea381e73 100644 --- a/build/FLExBridge.proj +++ b/build/FLExBridge.proj @@ -45,7 +45,6 @@ - @@ -80,11 +79,6 @@ - - - - @@ -134,7 +128,7 @@ - + diff --git a/build/WixPatchableInstaller.targets b/build/WixPatchableInstaller.targets index 4742839f..93ff8d02 100644 --- a/build/WixPatchableInstaller.targets +++ b/build/WixPatchableInstaller.targets @@ -50,11 +50,14 @@ $(InstallersBaseDir)/$(SafeApplicationName)_Build_Master objects/$(SafeApplicationName) $(BinDirSuffix)_Data + $(SafeApplicationName)_$(BuildVersion).msi + $(RootDir)/src/WiXInstaller/BaseInstallerBuild + "$(ApplicationName)" $(SafeApplicationName) $(BuildVersion) $(ProductIdGuid) $(UpgradeCodeGuid) "$(AppBuildDir)/$(BinDirSuffix)" "$(AppBuildDir)/$(DataDirSuffix)" $(CopyrightYear) "$(Manufacturer)" $(SafeManufacturer) - + @@ -131,6 +134,7 @@ $(RootDir)/src/WiXInstaller/libs + - + + + + + "$(ApplicationName)" $(SafeApplicationName) $(BuildVersion) $(ProductIdGuid) $(UpgradeCodeGuid) "$(AppBuildDir)/$(BinDirSuffix)" "$(AppBuildDir)/$(DataDirSuffix)" $(CopyrightYear) "$(Manufacturer)" $(SafeManufacturer) + + + + + + + + + + + + + + + + - $(SafeApplicationName)_$(BuildVersion).msi - $(RootDir)/src/WiXInstaller/BaseInstallerBuild - "$(ApplicationName)" $(SafeApplicationName) $(BuildVersion) $(ProductIdGuid) $(UpgradeCodeGuid) "$(AppBuildDir)/$(BinDirSuffix)" "$(AppBuildDir)/$(DataDirSuffix)" $(CopyrightYear) "$(Manufacturer)" $(SafeManufacturer) + "$(ApplicationName)" $(SafeApplicationName) $(BuildVersion) $(ProductIdGuid) $(UpgradeCodeGuid) "$(AppBuildDir)/$(BinDirSuffix)" "$(AppBuildDir)/$(DataDirSuffix)" $(CopyrightYear) "$(Manufacturer)" $(SafeManufacturer) - + + + + + + "$(ApplicationName)" $(SafeApplicationName) $(BuildVersion) $(ProductIdGuid) $(UpgradeCodeGuid) "$(AppBuildDir)/$(BinDirSuffix)" "$(AppBuildDir)/$(DataDirSuffix)" $(CopyrightYear) "$(Manufacturer)" $(SafeManufacturer) + + diff --git a/l10n/l10n.proj b/l10n/l10n.proj index cf075088..47564186 100644 --- a/l10n/l10n.proj +++ b/l10n/l10n.proj @@ -37,7 +37,7 @@ - + diff --git a/src/LibFLExBridge-ChorusPluginTests/LibFLExBridge-ChorusPluginTests.csproj b/src/LibFLExBridge-ChorusPluginTests/LibFLExBridge-ChorusPluginTests.csproj index 6f639b0c..6730e1b1 100644 --- a/src/LibFLExBridge-ChorusPluginTests/LibFLExBridge-ChorusPluginTests.csproj +++ b/src/LibFLExBridge-ChorusPluginTests/LibFLExBridge-ChorusPluginTests.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/WiXInstaller b/src/WiXInstaller index 4fed364c..133aa402 160000 --- a/src/WiXInstaller +++ b/src/WiXInstaller @@ -1 +1 @@ -Subproject commit 4fed364cd504097d0fd44f0c93f1954055e7e62e +Subproject commit 133aa402fe6016b841e93052c9f89d57d0bd015b From f066d6f895c4fce7a87e957d4336e272be8f9206 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Mon, 20 May 2024 16:30:42 -0700 Subject: [PATCH 2/9] Roll back the Wix version to fix installer * https://github.com/actions/runner-images/issues/9667 * Should be removed as soon as the runner version works --- .github/workflows/ci-cd.yml | 9 ++++++++- src/WiXInstaller | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f8f0adf0..5cbb7145 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -53,6 +53,13 @@ jobs: 8.0.x if: github.event_name != 'pull_request' + - name: Downgrade Wix Toolset - remove when runner has 3.14.2 + shell: cmd + run: | + choco uninstall wixtoolset + choco install wixtoolset --version 3.11.2 --allow-downgrade --force + echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + # If we are just doing a CI build we don't need real localizations, but the location must exist - name: Add Fake Localizations for CI shell: bash @@ -123,4 +130,4 @@ jobs: artifact: FlexBridge.msi secrets: certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - \ No newline at end of file + \ No newline at end of file diff --git a/src/WiXInstaller b/src/WiXInstaller index 133aa402..deb9f883 160000 --- a/src/WiXInstaller +++ b/src/WiXInstaller @@ -1 +1 @@ -Subproject commit 133aa402fe6016b841e93052c9f89d57d0bd015b +Subproject commit deb9f8836009264c09cbd950ba0777fcd42e7ca2 From bf4ef4053516e85d3b16517abd9873848628b00c Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Wed, 22 May 2024 14:20:05 -0700 Subject: [PATCH 3/9] Introduce the bundle build into our CD * Download the signed msi artifact and then and build bundles * Add a description parameter for signing --- .github/workflows/ci-cd.yml | 72 ++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5cbb7145..f0a6531e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -37,14 +37,14 @@ jobs: with: url: "https://download.microsoft.com/download/F/1/D/F1DEB8DB-D277-4EF9-9F48-3A65D4D8F965/NDP461-DevPack-KB3105179-ENU.exe" target: public/ - + - name: Install targeting pack shell: cmd working-directory: public run: NDP461-DevPack-KB3105179-ENU.exe /q - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 - + # We need the dotnet runtime to execute overcrowdin - name: Setup dotnet uses: actions/setup-dotnet@v4 @@ -52,14 +52,13 @@ jobs: dotnet-version: 8.0.x if: github.event_name != 'pull_request' - - - name: Downgrade Wix Toolset - remove when runner has 3.14.2 - shell: cmd + + - name: Downgrade Wix Toolset - remove when runner has 3.14.2 run: | choco uninstall wixtoolset choco install wixtoolset --version 3.11.2 --allow-downgrade --force echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - + # If we are just doing a CI build we don't need real localizations, but the location must exist - name: Add Fake Localizations for CI shell: bash @@ -70,7 +69,7 @@ jobs: shell: cmd run: dotnet tool install -g overcrowdin if: github.event_name != 'pull_request' - + - name: Restore L10n Packages shell: cmd @@ -78,24 +77,24 @@ jobs: cd l10n msbuild l10n.proj /t:restore if: github.event_name != 'pull_request' - + - name: Get Latest L10ns shell: cmd run: | cd l10n msbuild l10n.proj /t:GetLatestL10ns;CopyL10nsToDistFiles - if: github.event_name != 'pull_request' - + if: github.event_name != 'pull_request' + - name: Restore Build Tasks & Packages id: package_restore shell: cmd run: msbuild build\FLExBridge.proj /t:RestoreBuildTasks;RestorePackages - + - name: Build & Test id: build_and_test_step shell: cmd run: msbuild build\FLExBridge.proj /t:Test /p:Configuration=Release - + # All the following are used only when building an installer after a merge - name: Build Msi id: build_msi @@ -120,14 +119,55 @@ jobs: if-no-files-found: error overwrite: true if: github.event_name != 'pull_request' - - sign-installer: + + sign-msi: name: Sign FlexBridge Installer needs: build_and_test if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@v2 + uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls with: artifact: FlexBridge.msi + description: 'FLex Bridge Installer' secrets: certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - \ No newline at end of file + + build-offline-bundle: + name: Build offline bundle + needs: sign-msi + if: github.event_name != 'pull_request' + runs-on: windows-latest + steps: + - name: Checkout Files + uses: actions/checkout@v4 + id: checkout + with: + fetch-depth: 0 + submodules: true + + - name: Downgrade Wix Toolset - remove when runner has 3.14.2 + run: | + choco uninstall wixtoolset + choco install wixtoolset --version 3.11.2 --allow-downgrade --force + echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Download FlexBridge artifact + uses: actions/download-artifact@v4 + with: + name: FlexBridge.msi + path: src/WiXInstaller/BaseInstallerBuild # Target directory for the downloaded artifact + run: ls -R src/WiXInstaller/BaseInstallerBuild + +# - name: Unzip FlexBridge artifact +# run: unzip src/WiXInstaller/BaseInstallerBuild/FlexBridge.msi.zip -d src/WiXInstaller/BaseInstallerBuild + + # All the following are used only when building an installer after a merge + - name: Build Bundles + id: build_bundles + working-directory: build + shell: cmd + run: | + msbuild FLExBridge.proj /t:RestoreBuildTasks;RestorePackages + msbuild FLExBridge.proj /t:BuildProductBaseBundles /p:Configuration=Release /p:Platform="Any CPU" \ No newline at end of file From 3e43a17af674df16809d3eab1ea45616a0f5dd87 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Thu, 6 Jun 2024 11:57:05 -0700 Subject: [PATCH 4/9] Extract wix override copy to enable GHA bundle build * Also update framework dependency to net48 --- build/WixPatchableInstaller.targets | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/build/WixPatchableInstaller.targets b/build/WixPatchableInstaller.targets index 93ff8d02..939e3170 100644 --- a/build/WixPatchableInstaller.targets +++ b/build/WixPatchableInstaller.targets @@ -82,7 +82,7 @@ - + @@ -114,14 +114,19 @@ - - + + + + + + + @@ -135,8 +140,8 @@ $(RootDir)/src/WiXInstaller/libs - + Date: Thu, 6 Jun 2024 18:10:45 -0700 Subject: [PATCH 5/9] Run the burn detatch and upload files --- .github/workflows/ci-cd.yml | 58 +++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f0a6531e..c8795e06 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -136,6 +136,8 @@ jobs: needs: sign-msi if: github.event_name != 'pull_request' runs-on: windows-latest + env: + FILESTOSIGNLATER: "${{ github.workspace }}\\filesToSign" steps: - name: Checkout Files uses: actions/checkout@v4 @@ -158,10 +160,6 @@ jobs: with: name: FlexBridge.msi path: src/WiXInstaller/BaseInstallerBuild # Target directory for the downloaded artifact - run: ls -R src/WiXInstaller/BaseInstallerBuild - -# - name: Unzip FlexBridge artifact -# run: unzip src/WiXInstaller/BaseInstallerBuild/FlexBridge.msi.zip -d src/WiXInstaller/BaseInstallerBuild # All the following are used only when building an installer after a merge - name: Build Bundles @@ -169,5 +167,53 @@ jobs: working-directory: build shell: cmd run: | - msbuild FLExBridge.proj /t:RestoreBuildTasks;RestorePackages - msbuild FLExBridge.proj /t:BuildProductBaseBundles /p:Configuration=Release /p:Platform="Any CPU" \ No newline at end of file + msbuild FLExBridge.proj /t:RestoreBuildTasks;RestorePackages;GetDotNetFiles;CopyWixOverrides + msbuild FLExBridge.proj /t:BuildProductBaseBundles /p:Configuration=Release /p:Platform="Any CPU" + + - name: Extract burn engines + id: extract_engines + working-directory: BuildDir + shell: cmd + run: | + insignia -ib FlexBridge_Offline.exe -o offline-engine.exe + insignia -ib FlexBridge_Online.exe -o online-engine.exe + + - name: Upload Offline Engine + id: upload-offline-engine + uses: actions/upload-artifact@v4 + with: + name: offline-engine + path: BuildDir/offline-engine.exe + if-no-files-found: error + overwrite: true + if: github.event_name != 'pull_request' + + - name: Upload Offline Bundle(detatched) + id: upload-offline-detached + uses: actions/upload-artifact@v4 + with: + name: offline-detached + path: BuildDir/FlexBridge_Offline.exe + if-no-files-found: error + overwrite: true + if: github.event_name != 'pull_request' + + - name: Upload Online Engine + id: upload-online-engine + uses: actions/upload-artifact@v4 + with: + name: online-engine + path: BuildDir/online-engine.exe + if-no-files-found: error + overwrite: true + if: github.event_name != 'pull_request' + + - name: Upload Online Bundle(detached) + id: upload-online-detached + uses: actions/upload-artifact@v4 + with: + name: online-detached + path: BuildDir/FlexBridge_Online.exe + if-no-files-found: error + overwrite: true + if: github.event_name != 'pull_request' \ No newline at end of file From 5fb1d5b18e9b4870ac85f9de0d6256fea729c391 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Thu, 6 Jun 2024 20:35:32 -0700 Subject: [PATCH 6/9] Complete the CD actions and upload signed FB Installers * Sign engines, reattach engines, upload and sign bundles --- .github/workflows/ci-cd.yml | 129 +++++++++++++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c8795e06..acd24e34 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -21,7 +21,7 @@ jobs: CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} FILESTOSIGNLATER: "${{ github.workspace }}\\filesToSign" teamcity_build_checkoutDir: ${{ github.workspace }} - name: Build Debug and run Tests + name: Build Debug / Test / Build Msi runs-on: windows-latest steps: - name: Checkout Files @@ -103,6 +103,8 @@ jobs: msbuild build/FLExBridge.proj /t:CleanMasterOutputDir;PreparePublishingArtifactsInternal;BuildProductBaseMsi /p:UploadFolder=${{ inputs.environment || 'Alpha' }} if: github.event_name != 'pull_request' + # REVIEW: The .msi file is named with the version, there is probably a cleaner way to generate the correct filename + # and after completing the work to do signing of the bundles it became clear that capturing the files in the signtool wasn't necessary - name: Prepare for msi signing shell: bash run: | @@ -127,12 +129,12 @@ jobs: uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls with: artifact: FlexBridge.msi - description: 'FLex Bridge Installer' + description: 'FLEx Bridge Installer' secrets: certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} - build-offline-bundle: - name: Build offline bundle + build-bundles: + name: Build Installer Bundles needs: sign-msi if: github.event_name != 'pull_request' runs-on: windows-latest @@ -161,7 +163,6 @@ jobs: name: FlexBridge.msi path: src/WiXInstaller/BaseInstallerBuild # Target directory for the downloaded artifact - # All the following are used only when building an installer after a merge - name: Build Bundles id: build_bundles working-directory: build @@ -189,10 +190,10 @@ jobs: if: github.event_name != 'pull_request' - name: Upload Offline Bundle(detatched) - id: upload-offline-detached + id: upload-offline-bundle uses: actions/upload-artifact@v4 with: - name: offline-detached + name: FlexBridge_Offline.exe path: BuildDir/FlexBridge_Offline.exe if-no-files-found: error overwrite: true @@ -209,11 +210,119 @@ jobs: if: github.event_name != 'pull_request' - name: Upload Online Bundle(detached) - id: upload-online-detached + id: upload-online-bundle uses: actions/upload-artifact@v4 with: - name: online-detached + name: FlexBridge_Online.exe path: BuildDir/FlexBridge_Online.exe if-no-files-found: error overwrite: true - if: github.event_name != 'pull_request' \ No newline at end of file + if: github.event_name != 'pull_request' + + sign-offline-engine: + name: Sign Offline Engine + needs: build-bundles + if: github.event_name != 'pull_request' + uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + with: + artifact: offline-engine + description: 'FLEx Bridge Installer' + secrets: + certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} + + sign-online-engine: + name: Sign Online Engine + needs: build-bundles + if: github.event_name != 'pull_request' + uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + with: + artifact: online-engine + description: 'FLEx Bridge Installer' + secrets: + certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} + + reattach-engines: + runs-on: windows-latest + needs: [sign-offline-engine, sign-online-engine] + steps: + - name: Downgrade Wix Toolset - remove when runner has 3.14.2 + run: | + choco uninstall wixtoolset + choco install wixtoolset --version 3.11.2 --allow-downgrade --force + echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Download signed online engine + uses: actions/download-artifact@v4 + with: + name: online-engine + - name: Download signed offline engine + uses: actions/download-artifact@v4 + with: + name: offline-engine + - name: Download Online Bundle + uses: actions/download-artifact@v4 + with: + name: FlexBridge_Online.exe + - name: Download Offline Bundle + uses: actions/download-artifact@v4 + with: + name: FlexBridge_Offline.exe + + - name: Reattach Engines + shell: cmd + run: | + insignia -ab online-engine.exe FlexBridge_Online.exe -o FlexBridge_Online.exe + insignia -ab offline-engine.exe FlexBridge_Offline.exe -o FlexBridge_Offline.exe + + - name: Upload Online Bundle(attached) + id: upload-online-bundle + uses: actions/upload-artifact@v4 + with: + name: FlexBridge_Online.exe + path: FlexBridge_Online.exe + if-no-files-found: error + overwrite: true + if: github.event_name != 'pull_request' + + - name: Upload Offline Bundle(attached) + id: upload-offline-bundle + uses: actions/upload-artifact@v4 + with: + name: FlexBridge_Offline.exe + path: FlexBridge_Offline.exe + if-no-files-found: error + overwrite: true + if: github.event_name != 'pull_request' + + - name: Cleanup Offline Engine + uses: geekyeggo/delete-artifact@v5 + with: + name: offline-engine + + - name: Cleanup Online Engine + uses: geekyeggo/delete-artifact@v5 + with: + name: online-engine + + sign-offline-bundle: + name: Sign Offline Bundle + needs: reattach-engines + if: github.event_name != 'pull_request' + uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + with: + artifact: FlexBridge_Offline.exe + description: 'FLEx Bridge Installer' + secrets: + certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} + + sign-online-bundle: + name: Sign Online Bundle + needs: reattach-engines + if: github.event_name != 'pull_request' + uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + with: + artifact: FlexBridge_Online.exe + description: 'FLEx Bridge Installer' + secrets: + certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} + From e3c47bea96417ed73ad5b3439c65796fd891f304 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Thu, 13 Jun 2024 14:15:40 -0700 Subject: [PATCH 7/9] Fix crash launching FlexBridge from places other than lexbox --- .../ActionHandlers/ObtainAnyProjectActionHandler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TriboroughBridge-ChorusPlugin/Infrastructure/ActionHandlers/ObtainAnyProjectActionHandler.cs b/src/TriboroughBridge-ChorusPlugin/Infrastructure/ActionHandlers/ObtainAnyProjectActionHandler.cs index acc867b3..8d985ff9 100644 --- a/src/TriboroughBridge-ChorusPlugin/Infrastructure/ActionHandlers/ObtainAnyProjectActionHandler.cs +++ b/src/TriboroughBridge-ChorusPlugin/Infrastructure/ActionHandlers/ObtainAnyProjectActionHandler.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2010-2023 SIL International +// Copyright (c) 2010-2023 SIL International // This software is licensed under the MIT License (http://opensource.org/licenses/MIT) using System; @@ -76,9 +76,9 @@ void IBridgeActionTypeHandler.StartWorking(IProgress progress, Dictionary _pathToRepository = options[CommandLineProcessor.projDir]; CloneResult result; - var uriArg = options[CommandLineProcessor.uri]; - var projectArg = options[CommandLineProcessor.project]; - var identifier = options[CommandLineProcessor.repositoryIdentifier]; + options.TryGetValue(CommandLineProcessor.uri, out var uriArg); + options.TryGetValue(CommandLineProcessor.project, out var projectArg); + options.TryGetValue(CommandLineProcessor.repositoryIdentifier, out var identifier); if (!string.IsNullOrEmpty(uriArg) && !string.IsNullOrEmpty(projectArg)) { var projectFoldersByIdentifier = GetSharedProjectModel.ExtantRepoIdentifiers(_pathToRepository, LibTriboroughBridgeSharedConstants.OtherRepositories); From 79893d711bc5b72c42263dbbc3d451dbe3488c86 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Thu, 20 Jun 2024 08:05:03 -0700 Subject: [PATCH 8/9] Update sign action tags to release version --- .github/workflows/ci-cd.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index acd24e34..e1fecb3a 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -126,7 +126,7 @@ jobs: name: Sign FlexBridge Installer needs: build_and_test if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 with: artifact: FlexBridge.msi description: 'FLEx Bridge Installer' @@ -223,7 +223,7 @@ jobs: name: Sign Offline Engine needs: build-bundles if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 with: artifact: offline-engine description: 'FLEx Bridge Installer' @@ -234,7 +234,7 @@ jobs: name: Sign Online Engine needs: build-bundles if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 with: artifact: online-engine description: 'FLEx Bridge Installer' @@ -308,7 +308,7 @@ jobs: name: Sign Offline Bundle needs: reattach-engines if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 with: artifact: FlexBridge_Offline.exe description: 'FLEx Bridge Installer' @@ -319,7 +319,7 @@ jobs: name: Sign Online Bundle needs: reattach-engines if: github.event_name != 'pull_request' - uses: sillsdev/codesign/.github/workflows/sign.yml@feature/enableDispatchCalls + uses: sillsdev/codesign/.github/workflows/sign.yml@v2.1 with: artifact: FlexBridge_Online.exe description: 'FLEx Bridge Installer' From 07c39a256ac1471a2891882bb6bd4f021ae5d6b9 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Mon, 24 Jun 2024 06:37:40 -0700 Subject: [PATCH 9/9] Remove useles comment and add a link to wix toolset issue * Also only downgrade WIX when building installers (not PRs) --- .github/workflows/ci-cd.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e1fecb3a..64c285c1 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -33,7 +33,7 @@ jobs: - name: Download 461 targeting pack uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 - id: downloadfile # Remember to give an ID if you need the output filename + id: downloadfile with: url: "https://download.microsoft.com/download/F/1/D/F1DEB8DB-D277-4EF9-9F48-3A65D4D8F965/NDP461-DevPack-KB3105179-ENU.exe" target: public/ @@ -58,6 +58,7 @@ jobs: choco uninstall wixtoolset choco install wixtoolset --version 3.11.2 --allow-downgrade --force echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + if: github.event_name != 'pull_request' # If we are just doing a CI build we don't need real localizations, but the location must exist - name: Add Fake Localizations for CI @@ -149,6 +150,7 @@ jobs: submodules: true - name: Downgrade Wix Toolset - remove when runner has 3.14.2 + # See: https://github.com/actions/runner-images/issues/9667 run: | choco uninstall wixtoolset choco install wixtoolset --version 3.11.2 --allow-downgrade --force