Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Windows releases are signed with Artifact Signing once its secrets exist (unsigned until then), and the signature is checked

christianmat5a16c3a0d20c
diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml
index 3b157ca8..395340f3 100644
--- a/.github/workflows/preview.yml
+++ b/.github/workflows/preview.yml
@@ -105,12 +105,40 @@ jobs:
# unit tests run in ci.yml; a slower runner here only trips their timing checks
- name: Build (helpers, whisper-server, app)
run: pnpm -C app build
- - name: Package (unsigned)
+ - name: Package
env:
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
# a preview (by hand) was never released: it is marked so it never looks for updates (src/main/updates.ts)
PREVIEW: ${{ inputs.release != true }}
- run: cd app && pnpm exec electron-builder ${{ matrix.platform }} --publish never $([ "$PREVIEW" = true ] && echo -c.extraMetadata.yogurtPreview=true)
+ # Windows releases are signed by Microsoft's Artifact Signing (account yogurt-signing, East US) once these
+ # three secrets exist; without them the installer stays unsigned, as before
+ AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
+ AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
+ AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
+ # the name on the certificate, exactly as Microsoft validated it
+ PUBLISHER: ${{ vars.WINDOWS_PUBLISHER_NAME || 'Frigade Inc.' }}
+ PROFILE: ${{ vars.WINDOWS_CERT_PROFILE || 'yogurt' }}
+ run: |
+ cd app
+ set -- ${{ matrix.platform }} --publish never
+ [ "$PREVIEW" = true ] && set -- "$@" -c.extraMetadata.yogurtPreview=true
+ if [ "$RUNNER_OS" = Windows ] && [ "$PREVIEW" != true ] && [ -n "$AZURE_CLIENT_SECRET" ]; then
+ echo "::notice::Signing the Windows installer as $PUBLISHER"
+ set -- "$@" "-c.win.azureSignOptions.publisherName=$PUBLISHER" -c.win.azureSignOptions.endpoint=https://eus.codesigning.azure.net/ \
+ -c.win.azureSignOptions.codeSigningAccountName=yogurt-signing "-c.win.azureSignOptions.certificateProfileName=$PROFILE"
+ echo "SIGNED=true" >> "$GITHUB_ENV"
+ fi
+ pnpm exec electron-builder "$@"
+ # a signed build must really be signed, the app and its installer both
+ - name: Check the signature
+ if: runner.os == 'Windows' && env.SIGNED == 'true'
+ shell: pwsh
+ run: |
+ foreach ($f in @('app/dist/Yogurt-windows-x64.exe', 'app/dist/win-unpacked/Yogurt.exe')) {
+ $s = Get-AuthenticodeSignature $f
+ Write-Host "$f : $($s.Status) $($s.SignerCertificate.Subject)"
+ if ($s.Status -ne 'Valid') { throw "$f is not signed: $($s.Status)" }
+ }
# kept before the checks below, so testers get the installer even when one of them fails
- uses: actions/upload-artifact@v4
with:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 176ed40f..80d9eaf0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -153,6 +153,8 @@ jobs:
with:
ref: ${{ needs.plan.outputs.ref }}
release: true
+ # the Windows installer is signed with Artifact Signing once its secrets exist (preview.yml)
+ secrets: inherit
# only a pushed tag publishes, and only once all three built; a run by hand never does
publish:
diff --git a/app/test/windowsSigning.test.ts b/app/test/windowsSigning.test.ts
new file mode 100644
index 00000000..069b5a1c
--- /dev/null
+++ b/app/test/windowsSigning.test.ts
@@ -0,0 +1,20 @@
+import { readFileSync } from 'node:fs'
+import { join } from 'node:path'
+import { describe, expect, it } from 'vitest'
+
+// Windows releases are signed by Microsoft's Artifact Signing once its secrets exist; until then they build unsigned
+const root = join(__dirname, '../..')
+const preview = readFileSync(join(root, '.github/workflows/preview.yml'), 'utf8')
+const release = readFileSync(join(root, '.github/workflows/release.yml'), 'utf8')
+
+describe('Windows signing', () => {
+ it('release.yml hands its secrets to the Windows build', () => {
+ expect(release).toMatch(/uses: \.\/\.github\/workflows\/preview\.yml[\s\S]*?secrets: inherit/)
+ })
+ it('a release signs with Artifact Signing only when the secrets are there, and checks the signature', () => {
+ for (const v of ['AZURE_TENANT_ID', 'AZURE_CLIENT_ID', 'AZURE_CLIENT_SECRET']) expect(preview).toContain(`secrets.${v}`)
+ expect(preview).toContain('azureSignOptions.codeSigningAccountName=yogurt-signing')
+ expect(preview).toContain('azureSignOptions.endpoint=https://eus.codesigning.azure.net/')
+ expect(preview).toContain('Get-AuthenticodeSignature')
+ })
+})