Builds, releases and publishes the StackQL packages for Windows:
stackql_windows_amd64.msi- Authenticode signed MSI installerstackql_windows_amd64.zip- ZIP containing the signedstackql.exe- the
stackqlChocolatey package, which installs the MSI from the releases proxy
This repo replaces the former stackql-msi and chocolatey-install repos.
- Windows with PowerShell 5.1 or later
- WiX Toolset v4 or later (
wix.exeon the PATH) with the UI extension installed:wix extension add -g WixToolset.UI.wixext - GitHub CLI authenticated with access to the
stackqlorg (gh auth login) - The hardware token holding the StackQL Studios code signing certificate, and the token client software (for example Thales SafeNet Authentication Client)
- Chocolatey, only if you want to build or test the Chocolatey package locally
Two things to be aware of when building:
- File versioning does not work if this repo lives in a synced folder (Dropbox, OneDrive and similar)
- AV scanning needs to be suspended temporarily while building
The overall StackQL release is driven from the stackql repo: a tag is pushed, a GitHub release is created, and the signed platform packages are added to that release as assets. Downloads are served through the releases proxy at releases.stackql.io, which is where the Chocolatey package pulls the MSI from.
The Windows part of that flow is the steps below. Run each script from the root of this repo.
Save the unsigned Windows build for the release as downloaded\stackql_windows_amd64.zip. The downloaded, bin and msi directories are gitignored.
.\build.ps1 trueInsert the hardware token before running. The script pauses so you can confirm the token is inserted, then prompts for the token password when signing the EXE and again when signing the MSI. Enter the password carefully: the token is locked out after more than 3 incorrect attempts.
The script expands the downloaded ZIP into bin\, stamps the version and file properties onto stackql.exe, signs it, builds and signs the MSI, then writes the outputs to msi\:
stackql_<version>_windows_amd64.msiandstackql_windows_amd64.msistackql_<version>_windows_amd64.zipandstackql_windows_amd64.zip
Running .\build.ps1 without true produces unsigned packages. These are fine for local testing but release.ps1 will refuse to upload them.
.\release.ps1The script reads the ProductVersion from msi\stackql_windows_amd64.msi and the file version of the stackql.exe inside msi\stackql_windows_amd64.zip (nothing is installed), checks that both match and are validly signed, then uploads both files as assets to the stackql/stackql release tagged v<version>. The release must already exist.
Existing assets are never overwritten. If an asset with the same name is already on the release it is skipped with a warning. To replace an asset, delete it from the release on GitHub first and run the script again. Pass -AllowUnsigned to upload unsigned packages.
Wait until the releases proxy is serving the new MSI at https://releases.stackql.io/stackql/latest/stackql_windows_amd64.msi, then run:
.\publish-prep.ps1 0.11.669The version can be given with or without the leading v. The script downloads the latest MSI from the proxy, confirms that its ProductVersion matches the version given (nothing is installed) and fails if it does not. It then updates:
chocolatey\tools\chocolateyinstall.ps1-checksum64is set to the SHA256 of the downloaded MSIchocolatey\stackql.nuspec-versionandreleaseNotesare set for the release
Review the changes, then commit and push to main:
git add chocolatey
git commit -m "v0.11.669"
git push origin mainThe push triggers the chocolatey-publish workflow, which:
- reads the version from
chocolatey\stackql.nuspec - checks whether that version already exists on chocolatey.org and stops if it does, so a push that does not bump the version is a no-op
- runs
choco pack, test installs the package on the runner, then pushes it to chocolatey.org using theCHOCOLATEY_API_KEYrepository secret
The workflow can also be started by hand from the Actions tab.
From an elevated PowerShell prompt:
cd chocolatey
choco pack
choco install stackql -dv -s "'.;https://chocolatey.org/api/v2/'"
choco uninstall stackql| Path | Purpose |
|---|---|
build.ps1 |
Step 1: builds and signs the MSI and ZIP |
release.ps1 |
Step 2: uploads the MSI and ZIP to the GitHub release |
publish-prep.ps1 |
Step 3: updates the Chocolatey package for a release |
stackql.wxs, en-us.wxl |
WiX source for the MSI |
inc\ |
Files bundled into the MSI: EULA, icon, installer images, command shell launcher |
lib\ |
Build tools: rcedit (version stamping) and signtool (Authenticode signing) |
chocolatey\ |
Chocolatey package source: stackql.nuspec and tools\ |
.github\workflows\chocolatey-publish.yml |
Publishes the Chocolatey package on push to main |
downloaded\, bin\, msi\ |
Gitignored build input and outputs |