fix(release): publish auto-update metadata via electron-builder#170
Merged
Conversation
Switch both build jobs to `electron-builder --publish always` so `latest-mac.yml`, `latest-linux.yml`, the macOS `.zip`, and `.blockmap` files reach the GitHub release. The previous `--publish never` + narrow softprops upload glob dropped these, causing the in-app updater to 404 on `latest-mac.yml` (#168). Closes #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/release.ymlfromelectron-builder --publish neverto--publish alwaysso electron-builder's GitHubPublisher uploadslatest-mac.yml,latest-linux.yml, the macOS.zip, and.blockmapfiles alongside the binaries.softprops/action-gh-releaseupload steps; their globs only matched*.dmg/*.AppImage/*.deband silently dropped the updater metadata.create-releasejob so auto-generated release notes still land first; electron-builder finds the existing draft by tag and reuses it.Why
In-app auto-update on macOS 404s on
https://github.com/johannesjo/parallel-code/releases/download/v<ver>/latest-mac.yml(#168). Theelectron-updaterclient (electron/ipc/updater.ts) andbuild.publishconfig inpackage.jsonare both correct — only the workflow was dropping the metadata. Verified by listing v1.10.0 assets: only*.deb,*.dmg,*.AppImagewere uploaded; nolatest-*.yml, no*-mac.zip, no*.blockmap.The new pattern is what the electron-builder docs recommend and is forward-compatible with v27 (which deprecates implicit
--publish).Notes for shipping
latest-mac.ymlretroactively requires byte-identical artifacts that we no longer have.secrets.GITHUB_TOKEN.permissions: contents: writeis already set on the workflow.Test plan
v1.10.1-rc.1) and confirmlatest-mac.yml,latest-linux.yml,*-mac.zip, and*.blockmapall appear in the release assets.create-releasejob are still present (electron-builder should reuse the draft, not overwrite the body).