2024-03-14 15:01:47 +00:00
|
|
|
## Releases
|
|
|
|
|
2024-05-08 04:31:26 +00:00
|
|
|
Conceptually, the release is straightforward: We trigger a GitHub workflow that
|
|
|
|
creates a draft release with artifacts built. When ready, we publish that
|
|
|
|
release. The download links on our website, and existing apps already check the
|
|
|
|
latest GitHub release and update accordingly.
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-05-08 04:31:26 +00:00
|
|
|
The complication comes by the fact that electron-builder's auto updaterr (the
|
|
|
|
mechanism that we use for auto updates) doesn't work with monorepos. So we need
|
|
|
|
to keep a separate (non-mono) repository just for doing releases.
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-05-02 14:22:39 +00:00
|
|
|
- Source code lives here, in [ente-io/ente](https://github.com/ente-io/ente).
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-05-02 14:22:39 +00:00
|
|
|
- Releases are done from
|
|
|
|
[ente-io/photos-desktop](https://github.com/ente-io/photos-desktop).
|
|
|
|
|
2024-05-08 04:31:26 +00:00
|
|
|
## Workflow - Release Candidates
|
2024-05-02 14:22:39 +00:00
|
|
|
|
2024-05-08 04:31:26 +00:00
|
|
|
Leading up to the release, we can make one or more draft releases that are not
|
|
|
|
intended to be published, but serve as test release candidates.
|
2024-05-02 14:22:39 +00:00
|
|
|
|
2024-05-08 04:31:26 +00:00
|
|
|
The workflow for making such "rc" builds is:
|
2024-05-02 14:22:39 +00:00
|
|
|
|
2024-05-08 04:31:26 +00:00
|
|
|
1. Update `package.json` in the source repo to use version `1.x.x-rc`. Create a
|
2024-05-08 04:56:21 +00:00
|
|
|
new draft release in the release repo with title `1.x.x-rc`. In the tag
|
2024-05-08 05:50:28 +00:00
|
|
|
input enter `v1.x.x-rc` and select the option to "create a new tag on
|
|
|
|
publish".
|
2024-05-02 14:22:39 +00:00
|
|
|
|
2024-05-08 04:31:26 +00:00
|
|
|
2. Push code to the `desktop/rc` branch in the source repo.
|
|
|
|
|
|
|
|
3. Trigger the GitHub action in the release repo
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-03-15 09:11:04 +00:00
|
|
|
```sh
|
2024-05-08 04:31:26 +00:00
|
|
|
gh workflow run desktop-release.yml
|
2024-03-15 09:11:04 +00:00
|
|
|
```
|
2024-05-08 04:40:34 +00:00
|
|
|
|
2024-05-11 13:49:56 +00:00
|
|
|
We can do steps 2 and 3 multiple times: each time it'll just update the
|
2024-05-08 04:31:26 +00:00
|
|
|
artifacts attached to the same draft.
|
|
|
|
|
|
|
|
## Workflow - Release
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-05-11 13:49:56 +00:00
|
|
|
1. Update source repo to set version `1.x.x` in `package.json` and finialize
|
|
|
|
the CHANGELOG.
|
2024-05-08 04:31:26 +00:00
|
|
|
|
2024-05-11 13:49:56 +00:00
|
|
|
2. Push code to the `desktop/rc` branch in the source repo.
|
2024-05-08 04:31:26 +00:00
|
|
|
|
|
|
|
3. In the release repo
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-05-02 14:22:39 +00:00
|
|
|
```sh
|
2024-05-03 05:58:06 +00:00
|
|
|
./.github/trigger-release.sh v1.x.x
|
2024-05-02 14:22:39 +00:00
|
|
|
```
|
|
|
|
|
2024-05-11 13:49:56 +00:00
|
|
|
4. If the build is successful, tag `desktop/rc` in the source repo.
|
2024-05-08 04:31:26 +00:00
|
|
|
|
|
|
|
```sh
|
|
|
|
# Assuming we're on desktop/rc that just got build
|
|
|
|
|
|
|
|
git tag photosd-v1.x.x
|
|
|
|
git push origin photosd-v1.x.x
|
|
|
|
```
|
|
|
|
|
2024-05-02 14:22:39 +00:00
|
|
|
## Post build
|
2024-03-14 15:01:47 +00:00
|
|
|
|
|
|
|
The GitHub Action runs on Windows, Linux and macOS. It produces the artifacts
|
|
|
|
defined in the `build` value in `package.json`.
|
|
|
|
|
2024-03-15 09:11:04 +00:00
|
|
|
- Windows - An NSIS installer.
|
|
|
|
- Linux - An AppImage, and 3 other packages (`.rpm`, `.deb`, `.pacman`)
|
|
|
|
- macOS - A universal DMG
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-05-02 14:22:39 +00:00
|
|
|
Additionally, the GitHub action notarizes and signs the macOS DMG (For this it
|
|
|
|
uses credentials provided via GitHub secrets).
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-05-02 14:22:39 +00:00
|
|
|
To rollout the build, we need to publish the draft release. Thereafter,
|
|
|
|
everything is automated:
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-03-15 09:11:04 +00:00
|
|
|
- The website automatically redirects to the latest release on GitHub when
|
|
|
|
people try to download.
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-03-15 09:11:04 +00:00
|
|
|
- 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
|
2024-05-02 07:22:05 +00:00
|
|
|
updates yet).
|
2024-03-14 15:01:47 +00:00
|
|
|
|
2024-03-15 09:11:04 +00:00
|
|
|
- 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.
|
2024-03-14 15:01:47 +00:00
|
|
|
|
|
|
|
We can also publish the draft releases by checking the "pre-release" option.
|
|
|
|
Such releases don't cause any of the channels (our website, or the desktop app
|
|
|
|
auto updater, or brew) to be notified, instead these are useful for giving links
|
2024-05-02 07:22:05 +00:00
|
|
|
to pre-release builds to customers.
|