File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,33 @@ jobs:
237237 pattern : ' *-*'
238238 merge-multiple : false
239239
240+ - name : Merge macOS latest-mac.yml (x64 + arm64)
241+ run : |
242+ # Each macOS arch build produces its own latest-mac.yml with only
243+ # that arch's entry. Merge them so electron-updater works for both.
244+ X64_YML="macos-latest-x64/latest-mac.yml"
245+ ARM_YML="macos-latest-arm64/latest-mac.yml"
246+
247+ if [ -f "$X64_YML" ] && [ -f "$ARM_YML" ]; then
248+ echo "Merging latest-mac.yml from both architectures"
249+ npm install --no-save js-yaml
250+ node -e "
251+ const fs = require('fs');
252+ const yaml = require('js-yaml');
253+ const x64 = yaml.load(fs.readFileSync('$X64_YML', 'utf8'));
254+ const arm = yaml.load(fs.readFileSync('$ARM_YML', 'utf8'));
255+ x64.files = [...(x64.files || []), ...(arm.files || [])];
256+ const out = yaml.dump(x64, { lineWidth: -1 });
257+ fs.writeFileSync('$X64_YML', out);
258+ console.log(out);
259+ "
260+ # Remove duplicate so only one latest-mac.yml is uploaded
261+ rm -f "$ARM_YML"
262+ else
263+ echo "Skipping merge — need both $X64_YML and $ARM_YML"
264+ ls -la macos-latest-*/latest-mac.yml 2>/dev/null || true
265+ fi
266+
240267 - name : Create Release
241268 uses : softprops/action-gh-release@v2
242269 env :
You can’t perform that action at this time.
0 commit comments