Build & Deployment Process
EarTrumpet uses GitHub Actions for its Continuous Integration and Continuous Deployment (CI/CD) pipeline. This process automates the building, packaging, and signing of the application for various distribution channels.
The entire workflow is defined in the .github/workflows/main.yml file.
Build Channels
The pipeline builds for three primary channels:
- Store: Creates an
.appxuploadpackage for submission to the Microsoft Store. This build uses the official Store publisher identity. - AppInstaller: Creates a sideloadable
.appxbundleand an.appinstallerfile for direct installation and updates from the EarTrumpet website. This is used for the experimental dev builds. - Chocolatey: Creates a traditional Win32 build (
.exeand associated files) packaged into a.nupkgfor the Chocolatey package manager.
Build Workflow with GitHub Actions
The main.yml workflow consists of two main jobs: build and release.
Build Job
This job runs in parallel for each channel and performs the following steps:
- Checkout Code: Fetches the source code from the repository.
- Initialize Versioning: Uses GitVersion to calculate a semantic version number based on the Git history.
- Restore Packages: Restores all required NuGet packages.
- Inject Secrets: Injects the Bugsnag API key into
app.configfor crash reporting. - Adjust Manifests: Modifies
Package.appxmanifestandPackage.StoreAssociation.xmlbased on the build channel. For example, it sets the correct publisher ID and adjusts the display name fordevbuilds. - Build with MSBuild: Compiles the source code and creates the appropriate package for the channel. The MSBuild arguments are tailored for each channel's needs:
- Store:
/p:UapAppxPackageBuildMode=CI - AppInstaller/Sideload:
/p:UapAppxPackageBuildMode=SideloadOnly /p:GenerateAppInstallerFile=true - Chocolatey: Builds the main
EarTrumpet.csprojdirectly to an output folder.
- Store:
- Publish Artifacts: Uploads the compiled packages and metadata as build artifacts for the
releasejob to consume.
Release Job
This job runs after the build job succeeds and is responsible for signing and deploying the artifacts.
- Download Artifacts: Retrieves the packages created by the
buildjob. -
Code Signing: All executables and application packages are signed using Azure Code Signing. This is a modern, key-vault-based signing solution.
# Example signing command from the workflow ... signtool.exe sign /v /fd SHA256 /tr http://timestamp.acs.microsoft.com /dlib "acs\bin\x64\Azure.CodeSigning.Dlib.dll" ... -
Repackaging: For Store and AppInstaller builds, the packages are expanded, the internal
.exeis signed, and then the packages are re-bundled. - Deployment:
- AppInstaller: The signed
.appxbundleand.appinstallerfiles are uploaded via SCP to theinstall.eartrumpet.appweb server. - Store: The signed
.appxuploadpackage is submitted to the Microsoft Partner Center using theStoreBrokerPowerShell module. - Chocolatey: The signed files are packaged into a
.nupkgand prepared for publishing to the Chocolatey repository.
- AppInstaller: The signed