desktop/docs/release.md
Conceptually, the release is straightforward:
We trigger a GitHub workflow that creates a (pre-)release with the build.
When ready, we make that release the latest.
The download links on our website, and existing apps already check the latest GitHub release and update automatically.
The complication comes from the fact that electron-builder's auto updater (the mechanism that we use for auto updates) doesn't work with monorepos. So we need to keep a separate repository just for holding the releases.
Source code lives here, in ente-io/ente.
Releases are done from ente-io/photos-desktop.
Nightly builds of main are published by a scheduled workflow automatically.
Each such workflow run will update the artifacts attached to the same
(pre-existing) pre-release.
If needed, this workflow can also be manually triggered:
gh workflow run desktop-release.yml --source=<branch>
Get latest main from upstream
Create new branch called v1.x.x_release_candidate and check out to it
Update the CHANGELOG
Update What's New
In changelog.ts, bump the version number
Open PR (title should be "[desktop] v1.x.x release candidate") and merge
Send the release candidate build for testing
Get latest main from upstream
Create new branch called v1.x.x and check out to it
Remove "-beta" from version in package.json
Finalize the CHANGELOG - remove (unreleased) and make sure changelog is final
Update the help changelog with the release notes (copy paste) for this version (make sure month is correct)
Open PR (title should be "[desktop] v1.x.x") and merge
Checkout to main, then get the latest upstream and then tag the merge commit on main in the source repo (this):
git tag photosd-v1.x.x
git push upstream photosd-v1.x.x
In the cloned release repo (https://github.com/ente-io/photos-desktop), run this command:
./.github/trigger-release.sh v1.x.x
This'll trigger the workflow and create a new "pre-release". It'll take around 20 minutes, wait until it's live.
Edit this pre-release to add the release notes (copy paste from changelog), check the "Set as the latest release" button and Update.
Once it is marked as latest, the release goes live.
Next, we need to create a new pre-release that'll hold subsequent nightly builds. Following steps are for that.
In the source repo, get latest main from upstream
Create new branch called v1.x.(x+1)-beta and check out to it
In package.json, change version to 1.x.(x+1)-beta
Update the CHANGELOG - add ## 1.x.(x+1)-beta (unreleased) with one empty point
Open PR (title should be "[desktop] v1.x.(x+1)-beta") and merge
In the release repo's releases, delete the existing nightly pre-release:
In the cloned release repo (https://github.com/ente-io/photos-desktop), run this command:
git tag v1.x.(x+1)-beta
git push origin v1.x.(x+1)-beta
Run this workflow
Once the workflow creates the new v1.x.(x+1)-beta pre-release, edit its description to "Nightly builds".
Done
To create extra one-off pre-releases in addition to the nightly 1.x.x-betas,
In your branch in the source repository, set the version in package.json to
something different, say 1.x.x-foo.
Create a new pre-release in the release repo with title 1.x.x-foo. In the
tag input enter v1.x.x-foo and select the option to "Create a new tag on
publish".
Trigger the workflow in the release repo:
gh workflow run desktop-release.yml --source=my-branch
The GitHub Action runs on Windows, Linux and macOS. It produces the artifacts
defined in the build value in package.json.
.rpm, .deb, .pacman)Additionally, the GitHub action notarizes and signs the macOS DMG (For this it uses credentials provided via GitHub secrets).
To rollout the build, we need to publish the draft release. Thereafter, everything is automated:
The website automatically redirects to the latest release on GitHub when people try to download.
The file formats with support auto update (Windows exe, the Linux AppImage
and the macOS DMG) also check the latest GitHub release automatically to
download and apply the update (the rest of the formats don't support auto
updates yet).
We're not putting the desktop app in other stores currently. It is available
as a brew cask, but we only had to open a PR to add the initial formula, now
their maintainers automatically bump the SHA, version number and the (derived
from the version) URL in the formula when their tools notice a new release on
our GitHub.