Skip to content

Commit 45b538d

Browse files
committed
fix: base64 encode signatures in latest.json (matches pubkey format)
1 parent 8f9695d commit 45b538d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/tauri-build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,32 +502,36 @@ jobs:
502502
export SIG_WINDOWS
503503
504504
# Create latest.json
505+
# NOTE: Signatures must be BASE64 ENCODED (same format as pubkey in tauri.conf.json)
505506
node -e "
506507
const fs = require('fs');
507508
const version = '${VERSION}';
508509
const baseUrl = '${BASE_URL}';
509510
const linuxTar = '${LINUX_TAR_NAME}';
510511
const windowsZip = '${WINDOWS_ZIP_NAME}';
511512
513+
// Base64 encode signatures (Tauri updater expects base64-encoded minisign format)
514+
const encodeSignature = (sig) => sig ? Buffer.from(sig).toString('base64') : '';
515+
512516
const json = {
513517
version: version,
514518
notes: 'See release notes at https://github.com/${{ github.repository }}/releases/tag/${TAG_NAME}',
515519
pub_date: new Date().toISOString(),
516520
platforms: {
517521
'darwin-aarch64': {
518-
signature: process.env.SIG_DARWIN_AARCH64 || '',
522+
signature: encodeSignature(process.env.SIG_DARWIN_AARCH64),
519523
url: baseUrl + '/msgReader_aarch64.app.tar.gz'
520524
},
521525
'darwin-x86_64': {
522-
signature: process.env.SIG_DARWIN_X86_64 || '',
526+
signature: encodeSignature(process.env.SIG_DARWIN_X86_64),
523527
url: baseUrl + '/msgReader_x64.app.tar.gz'
524528
},
525529
'linux-x86_64': {
526-
signature: process.env.SIG_LINUX || '',
530+
signature: encodeSignature(process.env.SIG_LINUX),
527531
url: baseUrl + '/' + linuxTar
528532
},
529533
'windows-x86_64': {
530-
signature: process.env.SIG_WINDOWS || '',
534+
signature: encodeSignature(process.env.SIG_WINDOWS),
531535
url: baseUrl + '/' + windowsZip
532536
}
533537
}

0 commit comments

Comments
 (0)