File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,12 +37,13 @@ jobs:
3737 name : webssh-win
3838 path : release/webssh-win.zip
3939
40- # ── macOS(dmg + zip,arm64 / x64)──
41- # macos-13 is an Intel runner: hdiutil can create both HFS+/APFS DMGs there.
42- # Newer macos-latest (arm64) runners hit a known electron-builder bug where
43- # the x64 DMG step fails to `hdiutil detach` the shared /Volumes/WebSSH.
40+ # ── macOS(dmg + zip,arm64)──
41+ # macos-13 (Intel) runners have been retired by GitHub, so build on
42+ # macos-latest (arm64). Cross-building the x64 DMG on Apple Silicon hits a
43+ # known electron-builder `hdiutil detach` failure on /Volumes/WebSSH, so CI
44+ # builds arm64 only (WEBSSH_MAC_ARCHS); local Mac builds still do both.
4445 macos :
45- runs-on : macos-13
46+ runs-on : macos-latest
4647 steps :
4748 - uses : actions/checkout@v5
4849 - uses : actions/setup-node@v5
5657 env :
5758 # CI has no Apple certificates — never attempt identity discovery.
5859 CSC_IDENTITY_AUTO_DISCOVERY : false
60+ # arm64 only on Apple Silicon runners (see comment above).
61+ WEBSSH_MAC_ARCHS : arm64
5962 run : |
6063 set -o pipefail
6164 npm run desktop:mac 2>&1 | tee mac-build.log
Original file line number Diff line number Diff line change @@ -87,13 +87,18 @@ try {
8787 process . exit ( 1 ) ;
8888}
8989
90- console . log ( '[2/3] Building macOS app (dmg + zip, arm64 then x64)...' ) ;
90+ console . log ( '[2/3] Building macOS app (dmg + zip, per-arch)...' ) ;
91+ // Which architectures to build. Defaults to both; CI on arm64 runners sets
92+ // WEBSSH_MAC_ARCHS=arm64 because cross-building the x64 DMG on Apple Silicon
93+ // hits a known electron-builder `hdiutil detach` failure on /Volumes/WebSSH.
94+ const archs = ( process . env . WEBSSH_MAC_ARCHS || 'arm64,x64' )
95+ . split ( ',' ) . map ( a => a . trim ( ) ) . filter ( Boolean ) ;
9196// Build each architecture in a SEPARATE electron-builder invocation. Running a
9297// single `--mac` for both arm64+x64 sequentially collides on the shared DMG
9398// volume name (/Volumes/WebSSH), making the second build's `hdiutil detach`
9499// fail on arm64 CI runners. Splitting per-arch lets each invocation detach its
95100// own volume cleanly.
96- for ( const arch of [ 'arm64' , 'x64' ] ) {
101+ for ( const arch of archs ) {
97102 console . log ( ` [2/3] electron-builder --mac --${ arch } ...` ) ;
98103 execSync ( `npx electron-builder --mac --${ arch } ` , {
99104 cwd : __dirname , stdio : 'inherit' , timeout : 900000 ,
You can’t perform that action at this time.
0 commit comments