Skip to content

Commit f449dec

Browse files
kodjima33claude
andauthored
fix(desktop): pass --publish never to the Linux packaging build (#10559)
electron-builder.config.mjs declares a `publish` block (GitHub provider), so electron-builder auto-publishes whenever it detects CI. The config comment spells out the resulting invariant: every build command must pass `--publish never`. `build:linux`, added with Linux support in #10096, did not — so the "Linux package · helper smoke" job of Desktop Windows CI has failed on every commit since d660a1a with: Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN" That job is a required check on every PR touching desktop/windows/**, so main has been red and the lane blocking since 2026-07-25 01:23 UTC. Add the flag to build:linux (build:mac had the same latent gap; no CI lane runs it, but the invariant is the same) and add a guard test so a platform build script cannot ship without it again. No release lane calls build:linux or build:mac — the Windows release workflow invokes electron-builder directly and already passes --publish never. Failure-Class: none Verified: pnpm vitest scripts/build-scripts-publish.test.mjs 4/4 pass; with the flag reverted on build:linux the guard fails exactly on that script (1 failed | 3 passed). prettier --check clean. End-to-end proof is the Linux package job on this PR, which runs the identical `pnpm run build:linux` command that is failing on main. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent eba9598 commit f449dec

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

desktop/windows/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"vad:assets": "node scripts/copy-vad-assets.mjs",
3333
"build:unpack": "npm run build && electron-builder --dir --config electron-builder.config.mjs",
3434
"build:win": "npm run build && electron-builder --win --x64 --config electron-builder.config.mjs --publish never",
35-
"build:mac": "electron-vite build && node scripts/bundle-pimono-extension.mjs && electron-builder --mac --config electron-builder.config.mjs",
36-
"build:linux": "electron-vite build && node scripts/bundle-pimono-extension.mjs && electron-builder --linux --config electron-builder.config.mjs",
35+
"build:mac": "electron-vite build && node scripts/bundle-pimono-extension.mjs && electron-builder --mac --config electron-builder.config.mjs --publish never",
36+
"build:linux": "electron-vite build && node scripts/bundle-pimono-extension.mjs && electron-builder --linux --config electron-builder.config.mjs --publish never",
3737
"test": "vitest run",
3838
"test:watch": "vitest",
3939
"fixtures:audio": "node scripts/gen-audio-fixtures.mjs",
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { readFileSync } from 'fs'
2+
import { resolve } from 'path'
3+
import { describe, it, expect } from 'vitest'
4+
5+
// electron-builder.config.mjs declares a `publish` block (GitHub provider), so
6+
// electron-builder auto-publishes whenever it detects CI — and then dies with
7+
// "GitHub Personal Access Token is not set" in lanes that have no token.
8+
// `build:linux` shipped without the flag and turned the Desktop Windows CI
9+
// Linux job red on main. Every platform build command must pass it.
10+
describe('electron-builder package scripts', () => {
11+
const scripts = JSON.parse(
12+
readFileSync(resolve(import.meta.dirname, '../package.json'), 'utf8')
13+
).scripts
14+
15+
const platformBuilds = Object.entries(scripts).filter(
16+
([, cmd]) => cmd.includes('electron-builder ') && /\s--(win|mac|linux)\b/.test(cmd)
17+
)
18+
19+
it('covers every platform target', () => {
20+
expect(platformBuilds.map(([name]) => name).sort()).toEqual([
21+
'build:linux',
22+
'build:mac',
23+
'build:win'
24+
])
25+
})
26+
27+
it.each(platformBuilds)('%s passes --publish never', (_name, cmd) => {
28+
expect(cmd).toContain('--publish never')
29+
})
30+
})

0 commit comments

Comments
 (0)