Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Move photos desktop to the shared release process

Manav Rathi7131b87c6418
diff --git a/.github/docs/app-release.md b/.github/docs/app-release.md
index 8e3fd066c7..3a22818185 100644
--- a/.github/docs/app-release.md
+++ b/.github/docs/app-release.md
@@ -1,11 +1,15 @@
# App release process
-Photos, Auth, Locker, and Ensu use the same release process, as described here.
+Photos, Auth, Locker, Ensu, and Photos desktop use the same release process, as described here.
> For simplicity, the following assumes we're trying to release Ensu, that main is `0.1.16-beta`, we want to release `0.1.16` and move main to `0.1.17-beta`.
>
> To do the same steps for another app, say "auth", you can just mechanically replace "ensu" with that "auth" in the steps.
+## App specifics
+
+- Photos desktop follows the same flow, but its stable releases live in [ente-io/photos-desktop](https://github.com/ente-io/photos-desktop). See [desktop/docs/release.md](../../desktop/docs/release.md) for more details.
+
## Normal development
Nightly builds of `main` are automatically created every weekday morning (IST), and can also be created by running `ensu-build.yml` manually.
diff --git a/.github/scripts/photos-desktop-version.mjs b/.github/scripts/photos-desktop-version.mjs
new file mode 100644
index 0000000000..cf65b6552e
--- /dev/null
+++ b/.github/scripts/photos-desktop-version.mjs
@@ -0,0 +1,87 @@
+#!/usr/bin/env node
+
+import fs from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+
+const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
+const files = {
+ packageJson: path.join(root, "desktop/package.json"),
+ packageLock: path.join(root, "desktop/package-lock.json"),
+};
+
+function read(file) {
+ return fs.readFileSync(file, "utf8");
+}
+
+function write(file, text) {
+ fs.writeFileSync(file, text);
+}
+
+function validateVersion(version) {
+ if (!/^\d+\.\d+\.\d+(-beta)?$/.test(version)) {
+ throw new Error(`Invalid desktop version: ${version}`);
+ }
+ return version;
+}
+
+function sourceVersion() {
+ return JSON.parse(read(files.packageJson)).version;
+}
+
+function value(file, regex) {
+ return read(file).match(regex)?.[1];
+}
+
+function replace(file, regex, replacement) {
+ const text = read(file);
+ let count = 0;
+ const next = text.replace(regex, (...args) => {
+ count += 1;
+ return typeof replacement === "function" ? replacement(...args) : replacement;
+ });
+ if (!count) throw new Error(`No match in ${path.relative(root, file)}`);
+ write(file, next);
+}
+
+function expect(label, actual, wanted) {
+ if (actual !== wanted) throw new Error(`${label}: expected ${wanted}, found ${actual}`);
+}
+
+function check() {
+ const version = sourceVersion();
+ expect("package-lock.json", value(files.packageLock, /"name": "ente",\n\s+"version": "([^"]+)"/), version);
+ expect('package-lock.json packages[""]', value(files.packageLock, /"": \{\n\s+"name": "ente",\n\s+"version": "([^"]+)"/), version);
+}
+
+function setVersion(version) {
+ validateVersion(version);
+ replace(files.packageJson, /("name": "ente",\n\s+"version": ")[^"]+(")/, (_m, a, b) => `${a}${version}${b}`);
+ replace(files.packageLock, /("name": "ente",\n\s+"version": ")[^"]+(")/, (_m, a, b) => `${a}${version}${b}`);
+ replace(files.packageLock, /("": \{\n\s+"name": "ente",\n\s+"version": ")[^"]+(")/, (_m, a, b) => `${a}${version}${b}`);
+ check();
+}
+
+function usage() {
+ console.error(`Usage:
+ node .github/scripts/photos-desktop-version.mjs get
+ node .github/scripts/photos-desktop-version.mjs set 1.7.25-beta
+ node .github/scripts/photos-desktop-version.mjs set 1.7.25`);
+}
+
+const [command = "get", ...args] = process.argv.slice(2);
+
+try {
+ if (command === "get") {
+ check();
+ console.log(sourceVersion());
+ } else if (command === "set") {
+ setVersion(args[0]);
+ } else {
+ usage();
+ process.exit(2);
+ }
+} catch (error) {
+ console.error(error.message);
+ process.exit(1);
+}
diff --git a/.github/workflows/app-release.yml b/.github/workflows/app-release.yml
index ed4f8fe604..f07ad10569 100644
--- a/.github/workflows/app-release.yml
+++ b/.github/workflows/app-release.yml
@@ -14,6 +14,7 @@ on:
- auth
- locker
- ensu
+ - photos-desktop
action:
description: "Release action"
required: true
@@ -63,7 +64,7 @@ jobs:
with:
client-id: ${{ secrets.ENTE_CI_GH_CLIENT_ID }}
private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}
- repositories: ente,nightly
+ repositories: ente,nightly,photos-desktop
permission-contents: write
permission-pull-requests: write
@@ -83,6 +84,8 @@ jobs:
app_version() {
if [ "${APP}" = "ensu" ]; then
node .github/scripts/ensu-version.mjs "$@"
+ elif [ "${APP}" = "photos-desktop" ]; then
+ node .github/scripts/photos-desktop-version.mjs "$@"
else
node .github/scripts/flutter-version.mjs "${APP}" "$@"
fi
@@ -98,10 +101,13 @@ jobs:
IFS=. read -r major minor patch <<< "${VERSION}"
expected_main_version="${VERSION}"
next_version="${major}.${minor}.$((patch + 1))"
- if [ "${APP}" = "ensu" ]; then
+ if [ "${APP}" = "ensu" ] || [ "${APP}" = "photos-desktop" ]; then
expected_main_version="${VERSION}-beta"
next_version="${next_version}-beta"
fi
+ if [ "${APP}" = "photos-desktop" ]; then
+ beta_tag="v${VERSION}-beta"
+ fi
next_branch="${APP}-v${next_version}"
main_version="$(app_version get)"
@@ -111,7 +117,7 @@ jobs:
fi
git switch -c "${release_branch}"
- if [ "${APP}" = "ensu" ]; then
+ if [ "${APP}" = "ensu" ] || [ "${APP}" = "photos-desktop" ]; then
app_version set "${VERSION}"
git commit -am "${APP^} v${VERSION}"
fi
@@ -122,11 +128,13 @@ jobs:
git switch -c "${next_branch}" main
app_version set "${next_version}"
- CHANGES_DIR="mobile/apps/${APP}/changes"
- if [ "${APP}" = "ensu" ]; then
- CHANGES_DIR="rust/apps/ensu/changes"
+ if [ "${APP}" != "photos-desktop" ]; then
+ CHANGES_DIR="mobile/apps/${APP}/changes"
+ if [ "${APP}" = "ensu" ]; then
+ CHANGES_DIR="rust/apps/ensu/changes"
+ fi
+ find "${CHANGES_DIR}" -maxdepth 1 -type f -name '*.md' ! -name README.md -delete
fi
- find "${CHANGES_DIR}" -maxdepth 1 -type f -name '*.md' ! -name README.md -delete
git commit -am "Start ${APP^} ${next_version}"
git push -u origin "${next_branch}"
@@ -142,6 +150,8 @@ jobs:
app_version() {
if [ "${APP}" = "ensu" ]; then
node .github/scripts/ensu-version.mjs "$@"
+ elif [ "${APP}" = "photos-desktop" ]; then
+ node .github/scripts/photos-desktop-version.mjs "$@"
else
node .github/scripts/flutter-version.mjs "${APP}" "$@"
fi
@@ -153,6 +163,28 @@ jobs:
}
release_branch="release/${APP}-v${VERSION}"
+
+ if [ "${APP}" = "photos-desktop" ]; then
+ if ! draft="$(GH_TOKEN="${APP_GH_TOKEN}" gh release view "v${VERSION}" --repo ente-io/photos-desktop --json isDraft --jq .isDraft 2>/dev/null)" || [ "${draft}" != "true" ]; then
+ echo "::error::v${VERSION} draft release does not exist in photos-desktop"
+ exit 1
+ fi
+ branch_version="$(app_version get)"
+ if [ "${branch_version}" != "${VERSION}" ]; then
+ echo "::error::${release_branch} is ${branch_version}, expected ${VERSION}"
+ exit 1
+ fi
+ release_sha="$(git rev-parse HEAD)"
+
+ git tag "photos-desktop-v${VERSION}" "${release_sha}"
+ git push origin "refs/tags/photos-desktop-v${VERSION}"
+
+ GH_TOKEN="${APP_GH_TOKEN}" gh release edit "v${VERSION}" --repo ente-io/photos-desktop --draft=false --prerelease=false --latest
+ GH_TOKEN="${APP_GH_TOKEN}" gh release delete "v${VERSION}" --yes --cleanup-tag --repo ente-io/nightly || true
+ git_push_release_branch ":refs/heads/${release_branch}"
+ exit 0
+ fi
+
rc_tag="${APP}-v${VERSION}-rc"
final_tag="${APP}-v${VERSION}"
diff --git a/.github/workflows/photos-desktop-build.yml b/.github/workflows/photos-desktop-build.yml
new file mode 100644
index 0000000000..ad67dd4d76
--- /dev/null
+++ b/.github/workflows/photos-desktop-build.yml
@@ -0,0 +1,168 @@
+name: "Build (Photos desktop)"
+
+# See .github/docs/app-release.md
+
+on:
+ push:
+ branches:
+ - "release/photos-desktop-v*"
+ workflow_dispatch:
+ schedule:
+ # Run every weekday at ~8:00 AM IST
+ - cron: "45 2 * * 1-5"
+
+permissions:
+ contents: read
+
+concurrency:
+ group: photos-desktop-build
+ cancel-in-progress: false
+
+jobs:
+ build-metadata:
+ runs-on: ubuntu-latest
+
+ outputs:
+ should_build: ${{ steps.prepare.outputs.should_build }}
+ commit_sha: ${{ steps.prepare.outputs.commit_sha }}
+ release_version: ${{ steps.prepare.outputs.release_version }}
+ is_rc: ${{ steps.prepare.outputs.is_rc }}
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ with:
+ ref: ${{ github.ref_name }}
+
+ - name: Prepare release
+ id: prepare
+ shell: bash
+ run: |
+ set -euo pipefail
+
+ if [[ "${GITHUB_EVENT_NAME}" == "schedule" ]] && git ls-remote --exit-code --heads origin 'release/photos-desktop-v*' >/dev/null 2>&1; then
+ echo "Active Photos desktop release branch found; skipping scheduled nightly"
+ echo "should_build=false" >> "${GITHUB_OUTPUT}"
+ exit 0
+ fi
+
+ release_version="$(node .github/scripts/photos-desktop-version.mjs get)"
+
+ is_rc=false
+ if [[ "${GITHUB_REF_NAME}" == release/photos-desktop-v* ]]; then
+ if [[ "${GITHUB_REF_NAME}" != "release/photos-desktop-v${release_version}" ]]; then
+ echo "::error::Branch ${GITHUB_REF_NAME} does not match desktop version ${release_version}"
+ exit 1
+ fi
+ is_rc=true
+ fi
+
+ echo "should_build=true" >> "${GITHUB_OUTPUT}"
+ echo "commit_sha=$(git rev-parse HEAD)" >> "${GITHUB_OUTPUT}"
+ echo "release_version=${release_version}" >> "${GITHUB_OUTPUT}"
+ echo "is_rc=${is_rc}" >> "${GITHUB_OUTPUT}"
+
+ build:
+ needs: build-metadata
+ if: needs.build-metadata.outputs.should_build == 'true'
+ runs-on: ${{ matrix.os }}
+ environment:
+ name: production
+
+ strategy:
+ matrix:
+ os: [macos-latest, ubuntu-latest, windows-latest]
+
+ env:
+ RELEASE_VERSION: ${{ needs.build-metadata.outputs.release_version }}
+ IS_RC: ${{ needs.build-metadata.outputs.is_rc }}
+
+ defaults:
+ run:
+ working-directory: desktop
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ with:
+ ref: ${{ needs.build-metadata.outputs.commit_sha }}
+
+ - name: Setup node
+ uses: actions/setup-node@v6
+ with:
+ node-version: 24
+ cache: "npm"
+ cache-dependency-path: "desktop/package-lock.json"
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Create universal ffmpeg binaries for macOS
+ if: startsWith(matrix.os, 'macos')
+ run: |
+ rm -f node_modules/ffmpeg-static/ffmpeg
+ npm_config_arch=arm64 node node_modules/ffmpeg-static/install.js
+ mv node_modules/ffmpeg-static/ffmpeg ffmpeg-arm64
+ npm_config_arch=x64 node node_modules/ffmpeg-static/install.js
+ mv node_modules/ffmpeg-static/ffmpeg ffmpeg-x64
+ lipo -create ffmpeg-arm64 ffmpeg-x64 -output node_modules/ffmpeg-static/ffmpeg
+ rm ffmpeg-arm64 ffmpeg-x64
+ file node_modules/ffmpeg-static/ffmpeg
+
+ - name: Install libarchive-tools for pacman build
+ if: startsWith(matrix.os, 'ubuntu')
+ run: sudo apt-get update && sudo apt-get install libarchive-tools
+
+ - name: Mint nightly token
+ id: nightly_token
+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
+ with:
+ client-id: ${{ secrets.ENTE_CI_GH_CLIENT_ID }}
+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}
+ owner: ${{ github.repository_owner }}
+ repositories: |
+ nightly
+ photos-desktop
+ permission-contents: write
+
+ - name: Build and publish
+ shell: bash
+ run: |
+ if [ "${RUNNER_OS}" = "macOS" ]; then
+ export CSC_LINK="${MAC_CERTS}"
+ export CSC_KEY_PASSWORD="${MAC_CERTS_PASSWORD}"
+ fi
+
+ npm run build:ci
+
+ platform=${{ startsWith(matrix.os, 'macos') && 'mac' || startsWith(matrix.os, 'windows') && 'windows' || 'linux' }}
+ if [ "${IS_RC}" = "true" ]; then
+ npm exec -- electron-builder --$platform --publish always
+ else
+ EP_PRE_RELEASE=true npm exec -- electron-builder --$platform --publish always -c.publish.provider=github -c.publish.owner=ente-io -c.publish.repo=nightly
+ fi
+ env:
+ GH_TOKEN: ${{ steps.nightly_token.outputs.token }}
+ MAC_CERTS: ${{ secrets.MAC_CERTS }}
+ MAC_CERTS_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }}
+ APPLE_ID: ${{ secrets.APPLE_ID }}
+ APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
+ AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
+ AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
+ AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
+ # Allow continually updating the rolling pre-release.
+ EP_GH_IGNORE_TIME: true
+
+ - name: Upload candidate installers to nightly
+ if: needs.build-metadata.outputs.is_rc == 'true'
+ shell: bash
+ env:
+ GH_TOKEN: ${{ steps.nightly_token.outputs.token }}
+ run: |
+ set -euo pipefail
+ tag="v${RELEASE_VERSION}"
+ gh release create "${tag}" --repo ente-io/nightly --prerelease --title "${tag}" --notes "Photos desktop release candidate" || true
+ shopt -s nullglob
+ files=(dist/ente-*.exe dist/ente-*.dmg dist/ente-*.AppImage dist/ente-*.deb dist/ente-*.rpm dist/ente-*.pacman)
+ gh release upload "${tag}" "${files[@]}" --repo ente-io/nightly --clobber
diff --git a/desktop/.github/workflows/desktop-release.yml b/desktop/.github/workflows/desktop-release.yml
deleted file mode 100644
index 00c6b7230c..0000000000
--- a/desktop/.github/workflows/desktop-release.yml
+++ /dev/null
@@ -1,120 +0,0 @@
-name: "Release"
-
-# Build the desktop app with code from ente-io/ente and create/update a release.
-#
-# For more details, see `docs/release.md` in ente-io/ente.
-
-on:
- # Trigger manually or `gh workflow run desktop-release.yml --source=foo`.
- workflow_dispatch:
- inputs:
- source:
- description: "Branch (ente-io/ente) to build"
- type: string
- schedule:
- # Run every weekday at ~8:00 AM IST.
- # See: [Note: Run workflow every 24 hours]
- #
- - cron: "45 2 * * 1-5"
- push:
- # Run when a tag matching the pattern "vd.d.d" is pushed. In particular,
- # this excludes the "-beta" tags.
- tags:
- - "v[0-9]+.[0-9]+.[0-9]+"
-
-permissions:
- contents: write
-
-jobs:
- release:
- runs-on: ${{ matrix.os }}
-
- defaults:
- run:
- working-directory: desktop
-
- strategy:
- matrix:
- os: [macos-latest, ubuntu-latest, windows-latest]
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v6
- with:
- # If triggered by a tag, checkout photosd-$tag from the source
- # repository. Otherwise checkout $source (default: "main").
- repository: ente-io/ente
- ref: "${{ startsWith(github.ref, 'refs/tags/v') &&
- format('photosd-{0}', github.ref_name) || ( inputs.source
- || 'main' ) }}"
-
- - name: Setup node
- uses: actions/setup-node@v6
- with:
- node-version: 24
- cache: "npm"
- cache-dependency-path: "desktop/package-lock.json"
-
- - name: Install dependencies
- run: npm ci
-
- - name: Create universal ffmpeg binaries for macOS
- if: startsWith(matrix.os, 'macos')
- # Currently, the ffmpeg-static binaries are not universal (Not
- # their fault, we thank them for their useful package, the issue
- # is that there don't seem to be well known upstream sources that
- # provide a universal binary).
- #
- # As a workaround, we invoke ffmpeg-static twice to download both
- # the Intel and ARM binaries, and combine them into a single
- # universal binary using lipo.
- #
- run: |
- rm -f node_modules/ffmpeg-static/ffmpeg
- npm_config_arch=arm64 node node_modules/ffmpeg-static/install.js
- mv node_modules/ffmpeg-static/ffmpeg ffmpeg-arm64
- npm_config_arch=x64 node node_modules/ffmpeg-static/install.js
- mv node_modules/ffmpeg-static/ffmpeg ffmpeg-x64
- lipo -create ffmpeg-arm64 ffmpeg-x64 -output node_modules/ffmpeg-static/ffmpeg
- rm ffmpeg-arm64 ffmpeg-x64
- file node_modules/ffmpeg-static/ffmpeg # print what we ended up with
-
- - name: Install libarchive-tools for pacman build
- if: startsWith(matrix.os, 'ubuntu')
- # See:
- # https://github.com/electron-userland/electron-builder/issues/4181
- run: sudo apt-get update && sudo apt-get install libarchive-tools
-
- - name: Build
- shell: bash
- run: |
- if [ "${RUNNER_OS}" = "macOS" ]; then
- export CSC_LINK="${MAC_CERTS}"
- export CSC_KEY_PASSWORD="${MAC_CERTS_PASSWORD}"
- fi
-
- npm run build:ci
- npm exec -- electron-builder --${{ startsWith(matrix.os, 'macos') && 'mac' || startsWith(matrix.os, 'windows') && 'windows' || 'linux' }} --publish always
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- MAC_CERTS: ${{ secrets.MAC_CERTS }}
- MAC_CERTS_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }}
- # macOS notarization credentials key details
- APPLE_ID: ${{ secrets.APPLE_ID }}
- APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
- APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- # Windows Azure Trusted Signing related values
- # https://www.electron.build/code-signing-win#using-azure-trusted-signing-beta
- AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
- AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
- AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
- # Default is "draft", but since our nightly builds update
- # existing pre-releases, set this to "prerelease".
- EP_PRE_RELEASE: true
- # By default, electron-builder does not update releases that
- # were more than 2 hours ago. Override this to allow us to
- # continually update our nightly pre-releases.
- EP_GH_IGNORE_TIME: true
- # Workaround recommended in
- # https://github.com/electron-userland/electron-builder/issues/3179
- USE_HARD_LINKS: false
diff --git a/desktop/docs/release.md b/desktop/docs/release.md
index f7f95f8e61..b7125f1d03 100644
--- a/desktop/docs/release.md
+++ b/desktop/docs/release.md
@@ -1,133 +1,39 @@
-## Releases
+# Photos desktop release process
-Conceptually, the release is straightforward:
+Photos desktop uses the shared [app release process](../../.github/docs/app-release.md) as the app `photos-desktop`.
-1. We trigger a GitHub workflow that creates a (pre-)release with the build.
+The main difference is that stable releases live in [ente-io/photos-desktop](https://github.com/ente-io/photos-desktop), not here, because electron-builder's auto updater doesn't work within a monorepo.
-2. When ready, we make that release the latest.
+Currently the electron-updater feed, the website and the `brew cask` track that repository's latest release.
-3. The download links on our website, and existing apps already check the latest GitHub release and update automatically.
+Apart from that, it is mostly as documented in the [app release process](../../.github/docs/app-release.md). Still, here is a brief recap.
-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.
+> For simplicity, the following assumes that main is `1.7.25-beta`, we want to release `1.7.25` and move main to `1.7.26-beta`.
-- Source code lives here, in [ente-io/ente](https://github.com/ente-io/ente).
+## Normal development
-- Releases are done from [ente-io/photos-desktop](https://github.com/ente-io/photos-desktop).
+Nightly builds of `main` are published by a scheduled workflow automatically, and can also be triggered by manually triggering the `photos-desktop-build.yml` workflow.
-## Nightly builds
+Nightly and RC builds go to [ente-io/nightly](https://github.com/ente-io/nightly) like the other apps.
-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:
+## Start release
```sh
-gh workflow run desktop-release.yml --source=<branch>
+gh workflow run app-release.yml -f action=start -f app=photos-desktop -f version=1.7.25
```
-## Release candidate for testing
-
-1. Get latest main from upstream
-
-2. Create new branch called `v1.x.x_release_candidate` and check out to it
-
-3. Update the [CHANGELOG](../CHANGELOG.md)
-
-4. Update [What's New](../../web/packages/new/photos/components/WhatsNew.tsx)
-
-5. In [changelog.ts](../../web/packages/new/photos/services/changelog.ts), bump the version number
-
-6. Open PR (title should be "[desktop] v1.x.x release candidate") and merge
-
-7. Send the release candidate build for testing
-
-## Release checklist
-
-1. Get latest main from upstream
-
-2. Create new branch called `v1.x.x` and check out to it
-
-3. Remove "-beta" from version in [package.json](../package.json)
-
-4. Finalize the [CHANGELOG](../CHANGELOG.md) - remove (unreleased) and make sure changelog is final
-
-5. Update the [help changelog](../../docs/docs/photos/changelog.md) with the release notes (copy paste) for this version (make sure month is correct)
-
-6. Open PR (title should be "[desktop] v1.x.x") and merge
-
-7. Checkout to main, then get the latest upstream and then tag the merge commit on `main` in the source repo (this):
-
- ```sh
- git tag photosd-v1.x.x
- git push upstream photosd-v1.x.x
- ```
-
-8. In the cloned release repo (https://github.com/ente-io/photos-desktop), run this command:
-
- ```sh
- ./.github/trigger-release.sh v1.x.x
- ```
-
-9. This'll trigger the workflow and create a new "pre-release". It'll take around 20 minutes, wait until it's live.
-
-10. Edit this pre-release to add the release notes (copy paste from changelog), check the "Set as the latest release" button and Update.
-
-11. Once it is marked as latest, the release goes live.
+Cherry-pick fixes to the release branch to rebuild the candidate.
-12. Next, we need to create a new pre-release that'll hold subsequent nightly builds. Following steps are for that.
+## Promote release
-13. In the source repo, get latest main from upstream
-
-14. Create new branch called `v1.x.(x+1)-beta` and check out to it
-
-15. In [package.json](../package.json), change version to `1.x.(x+1)-beta`
-
-16. Update the [CHANGELOG](../CHANGELOG.md) - add ## 1.x.(x+1)-beta (unreleased) with one empty point
-
-17. Open PR (title should be "[desktop] v1.x.(x+1)-beta") and merge
-
-18. In the release repo's [releases](https://github.com/ente-io/photos-desktop/releases), delete the existing _nightly_ pre-release:
-
-19. In the cloned release repo (https://github.com/ente-io/photos-desktop), run this command:
-
- ```sh
- git tag v1.x.(x+1)-beta
- git push origin v1.x.(x+1)-beta
- ```
-
-20. Run this [workflow](https://github.com/ente-io/photos-desktop/actions/workflows/desktop-release.yml)
-
-21. Once the workflow creates the new v1.x.(x+1)-beta pre-release, edit its description to "Nightly builds".
-
-22. Done
-
-## Ad-hoc builds
-
-To create extra one-off pre-releases in addition to the nightly `1.x.x-beta`s,
-
-1. In your branch in the source repository, set the version in `package.json` to something different, say `1.x.x-foo`.
-
-2. 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".
-
-3. Trigger the workflow in the release repo:
+```sh
+gh workflow run app-release.yml -f action=promote -f app=photos-desktop -f version=1.7.25
+```
- ```sh
- gh workflow run desktop-release.yml --source=my-branch
- ```
+Publishes the `v1.7.25` draft in `ente-io/photos-desktop` as the latest release, pushes the `photos-desktop-v1.7.25` source tag, removes the `v1.7.25` pre-release from `ente-io/nightly`, and deletes the release branch. The website and the brew cask pick up the new latest release automatically.
## Details
-The GitHub Action runs on Windows, Linux and macOS. It produces the artifacts defined in the `build` value in `package.json`.
-
-- Windows - An NSIS installer.
-- Linux - An AppImage, and 3 other packages (`.rpm`, `.deb`, `.pacman`)
-- macOS - A universal DMG
-
-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).
+The build runs on Windows, Linux and macOS, producing the artifacts configured in [electron-builder.yml](../electron-builder.yml): an NSIS installer (Windows), an AppImage and `.rpm`/`.deb`/`.pacman` packages (Linux), and a universal DMG (macOS). The macOS DMG is notarized and signed; Windows is signed via Azure Trusted Signing.
-- 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.
+The Windows `exe`, the Linux AppImage, and the macOS DMG check `ente-io/photos-desktop`'s latest release for auto updates; the other formats don't auto update yet.