From b4fefa14b0134652fc347990b642506c9da0e530 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Wed, 17 Apr 2024 13:37:43 -0700 Subject: [PATCH] WIP - Signing CD Action --- .github/workflows/ci-cd.yml | 31 ++++++++++++----- build/TestInstallerBuild.bat | 13 +++---- build/WixPatchableInstaller.targets | 34 ++++++++++++++++--- l10n/l10n.proj | 2 +- .../LibFLExBridge-ChorusPluginTests.csproj | 2 +- 5 files changed, 60 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e240e658..2770365a 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -5,6 +5,11 @@ 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 }} @@ -38,15 +43,15 @@ 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 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 @@ -62,26 +67,34 @@ jobs: shell: cmd run: msbuild build\FLExBridge.proj /t:Test + # All the following are used only when building an installer after a merge - name: Install Latest Overcrowdin shell: cmd run: dotnet tool install -g overcrowdin - if: github.event_name != 'pull_request' + #if: github.event_name != 'pull_request' + - name: Restore L10n Packages shell: cmd run: | cd l10n msbuild l10n.proj /t:restore - if: github.event_name != 'pull_request' + #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: Build Installer shell: cmd - run: msbuild build/FLExBridge.proj /t:Installer /p:UploadFolder=Alpha - if: github.event_name != 'pull_request' + run: msbuild build/FLExBridge.proj /t:CleanMasterOutputDir;PreparePublishingArtifactsInternal;BuildProductBaseMsi /p:UploadFolder=${{ inputs.environment || 'Alpha' }} + #if: github.event_name != 'pull_request' + + - name: Create Msi Digest + uses: sillsdev/techops-ansible/generate-digest@gha-runner-test + with: + path: src/WiXInstaller/BaseInstallerBuild/*.msi + public-cert: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} \ No newline at end of file diff --git a/build/TestInstallerBuild.bat b/build/TestInstallerBuild.bat index 9a1333c3..d1cd0a3a 100644 --- a/build/TestInstallerBuild.bat +++ b/build/TestInstallerBuild.bat @@ -15,16 +15,17 @@ set Path=%WIX%\bin;%PATH% echo Starting Build pushd . ( - MSBuild FLExBridge.proj /t:RestoreBuildTasks;RestorePackages +REM MSBuild FLExBridge.proj /t:RestoreBuildTasks;RestorePackages ) && ( - pushd ..\l10n +REM pushd ..\l10n ) && ( - MSBuild l10n.proj /t:restore +REM MSBuild l10n.proj /t:restore ) && ( - MSBuild l10n.proj /t:GetLatestL10ns +REM MSBuild l10n.proj /t:GetLatestL10ns ) && ( - popd +REM popd ) && ( - MSBuild FLExBridge.proj /target:Installer /p:Configuration=Debug /p:Platform="Any CPU" %* + MSBuild FLExBridge.proj /target:CleanMasterOutputDir;BuildProductBaseMsi /p:Configuration=Debug /p:Platform="Any CPU" %* ) popd +REM -2147024893/0x80070003 \ No newline at end of file diff --git a/build/WixPatchableInstaller.targets b/build/WixPatchableInstaller.targets index 4742839f..4e97783d 100644 --- a/build/WixPatchableInstaller.targets +++ b/build/WixPatchableInstaller.targets @@ -50,6 +50,9 @@ $(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) @@ -184,14 +187,35 @@ - + + + + + + + + + + + + + + + + + + - $(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..e934f0be 100644 --- a/src/LibFLExBridge-ChorusPluginTests/LibFLExBridge-ChorusPluginTests.csproj +++ b/src/LibFLExBridge-ChorusPluginTests/LibFLExBridge-ChorusPluginTests.csproj @@ -12,7 +12,7 @@ - +