π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Publish nightly/RC builds to public ente-io/nightly via GitHub App
Manav Rathi9c91bb16dc63
diff --git a/.github/docs/app-release.md b/.github/docs/app-release.mdindex 519b946a8f..8e3fd066c7 100644--- a/.github/docs/app-release.md+++ b/.github/docs/app-release.md@@ -8,7 +8,9 @@ Photos, Auth, Locker, and Ensu use the same release process, as described here.## Normal development-Nightly builds of `main` are automatically created every weekday morning (IST), and can also be created by running `ensu-build.yml` manually. These builds are attached to the draft `ensu-v0.1.16-beta` GitHub release; each nightly keeps updating the same draft.+Nightly builds of `main` are automatically created every weekday morning (IST), and can also be created by running `ensu-build.yml` manually.++The nightly builds are published to the `ensu-v0.1.16-beta` pre-release in [ente-io/nightly](https://github.com/ente-io/nightly); each nightly keeps updating the same pre-release.> [!NOTE]>@@ -28,8 +30,8 @@ gh workflow run app-release.yml \This:1. Creates a release branch `release/ensu-v0.1.16` with the version set to `0.1.16`-2. Pushes the branch, which triggers `ensu-build.yml` and creates the draft `ensu-v0.1.16-rc` GitHub release-3. Removes the `ensu-v0.1.16-beta` draft and tag+2. Pushes the branch, which triggers `ensu-build.yml`, which creates the draft `ensu-v0.1.16-rc` GitHub release in `ente-io/ente` (and a pre-release in `ente-io/nightly`).+3. Removes the `ensu-v0.1.16-beta` pre-release from `ente-io/nightly` and the beta tag from `ente-io/ente`.> [!TIP]>@@ -56,7 +58,7 @@ gh workflow run app-release.yml \-f version=0.1.16```-This does not create another build. It tags the last RC commit as `ensu-v0.1.16`, moves the GitHub draft from `ensu-v0.1.16-rc` to `ensu-v0.1.16`, removes the RC tag, and deletes the release branch.+This does not create another build. It tags the last RC commit as `ensu-v0.1.16`, moves the GitHub draft from `ensu-v0.1.16-rc` to `ensu-v0.1.16`, removes the RC tag, deletes the `ensu-v0.1.16-rc` pre-release from `ente-io/nightly`, and deletes the release branch.Publish the draft ensu-v0.1.16 release on GitHub when ready.@@ -66,10 +68,10 @@ Publish the draft ensu-v0.1.16 release on GitHub when ready.## Retries-`ensu-build.yml` is safe to retry. Both nightly and RC builds update fixed draft releases (`ensu-v0.1.16-beta` and `ensu-v0.1.16-rc`), and reruns update the same draft.+`ensu-build.yml` is safe to retry. Both nightly and RC builds update fixed releases (`ensu-v0.1.16-beta` and `ensu-v0.1.16-rc`), and reruns update the same ones.> [!NOTE]>> If a build has already reached Play Store or TestFlight, trigger a new workflow run instead of re-running failed jobs so that it gets a new build number.-`app-release.yml` changes release state. If it fails, inspect the failed step before re-running. After it has pushed a branch, created a tag, or moved a draft release, either finish the remaining step manually or undo the partial state first. Cleanup is intentionally late: `action=start` pushes the release branch before deleting the beta draft, and `action=promote` deletes the release branch last.+`app-release.yml` changes release state. If it fails, inspect the failed step before re-running. After it has pushed a branch, created a tag, or moved a draft release, either finish the remaining step manually or undo the partial state first. Cleanup is intentionally late: `action=start` pushes the release branch before deleting the beta pre-release from `ente-io/nightly`, and `action=promote` deletes the release branch last.diff --git a/.github/docs/secrets.md b/.github/docs/secrets.mddeleted file mode 100644index 3cc66bc541..0000000000--- a/.github/docs/secrets.md+++ /dev/null@@ -1,7 +0,0 @@-# Secrets--## RELEASE_BRANCH_PUSH_TOKEN--- Fine-grained PAT for `ente-io/ente` with `Contents: read/write`.-- Used by the workflows which trigger releases to create, update, and delete `release/*` branches.-- The PAT owner must be allowed to bypass the `release/*` branch ruleset.diff --git a/.github/scripts/release-notify.mjs b/.github/scripts/release-notify.mjsindex 59cbe69a55..96345b49e9 100644--- a/.github/scripts/release-notify.mjs+++ b/.github/scripts/release-notify.mjs@@ -22,12 +22,14 @@ const apps = {};const app = process.argv[2];-const config = apps[app];-const releaseUrl = process.argv[3];-if (!config || !releaseUrl) {- throw new Error(`Usage: node .github/scripts/release-notify.mjs ${Object.keys(apps).join("|")} <release-url>`);+const releaseTag = process.argv[3];+if (!config || !releaseTag) {+ throw new Error(`Usage: node .github/scripts/release-notify.mjs ${Object.keys(apps).join("|")} <release-tag>`);}+const config = apps[app];+const releaseUrl = `https://github.com/ente-io/nightly/releases/tag/${releaseTag}`;+const env = (name) => {const value = process.env[name];if (!value) {diff --git a/.github/workflows/app-release.yml b/.github/workflows/app-release.ymlindex cd3165012a..deae1a7f78 100644--- a/.github/workflows/app-release.yml+++ b/.github/workflows/app-release.yml@@ -57,6 +57,16 @@ jobs:with:ref: release/${{ inputs.app }}-v${{ inputs.version }}+ - name: Mint App token+ id: app_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: ente,nightly+ permission-contents: write+ permission-pull-requests: write+- name: Configure Gitif: inputs.action == 'start'run: |@@ -66,7 +76,7 @@ jobs:- name: Start releaseif: inputs.action == 'start'env:- RELEASE_BRANCH_PUSH_TOKEN: ${{ secrets.RELEASE_BRANCH_PUSH_TOKEN }}+ APP_GH_TOKEN: ${{ steps.app_token.outputs.token }}run: |set -euo pipefail@@ -80,7 +90,7 @@ jobs:git_push_release_branch() {git -c http.https://github.com/.extraheader= push \- "https://x-access-token:${RELEASE_BRANCH_PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$@"+ "https://x-access-token:${APP_GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$@"}release_branch="release/${APP}-v${VERSION}"@@ -107,7 +117,7 @@ jobs:figit_push_release_branch "${release_branch}"- gh release delete "${beta_tag}" --yes || true+ GH_TOKEN="${APP_GH_TOKEN}" gh release delete "${beta_tag}" --yes --cleanup-tag --repo ente-io/nightly || truegit push origin ":refs/tags/${beta_tag}" || truegit switch -c "${next_branch}" main@@ -120,12 +130,12 @@ jobs:git commit -am "Start ${APP^} ${next_version}"git push -u origin "${next_branch}"- gh pr create --base main --head "${next_branch}" --title "[${APP}] Start ${APP^} ${next_version}" --body ""+ GH_TOKEN="${APP_GH_TOKEN}" gh pr create --base main --head "${next_branch}" --title "[${APP}] Start ${APP^} ${next_version}" --body ""- name: Promote releaseif: inputs.action == 'promote'env:- RELEASE_BRANCH_PUSH_TOKEN: ${{ secrets.RELEASE_BRANCH_PUSH_TOKEN }}+ APP_GH_TOKEN: ${{ steps.app_token.outputs.token }}run: |set -euo pipefail@@ -139,7 +149,7 @@ jobs:git_push_release_branch() {git -c http.https://github.com/.extraheader= push \- "https://x-access-token:${RELEASE_BRANCH_PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$@"+ "https://x-access-token:${APP_GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "$@"}release_branch="release/${APP}-v${VERSION}"@@ -170,4 +180,5 @@ jobs:gh release edit "${rc_tag}" --tag "${final_tag}" --title "${final_tag}" --target "${release_sha}" --draft --verify-taggit push origin ":refs/tags/${rc_tag}" || true+ GH_TOKEN="${APP_GH_TOKEN}" gh release delete "${rc_tag}" --yes --cleanup-tag --repo ente-io/nightly || truegit_push_release_branch ":refs/heads/${release_branch}"diff --git a/.github/workflows/auth-build.yml b/.github/workflows/auth-build.ymlindex 809577b148..6f2c621e2e 100644--- a/.github/workflows/auth-build.yml+++ b/.github/workflows/auth-build.yml@@ -173,7 +173,31 @@ jobs:name: auth-sha256sum-androidpath: mobile/apps/auth/artifacts/sha256sum-apk- - name: Upload Android artifact to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload Android APK to nightly release+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ repo: nightly+ token: ${{ steps.nightly_token.outputs.token }}+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ artifacts: "mobile/apps/auth/artifacts/ente-auth-*.apk"+ prerelease: true+ makeLatest: false+ allowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload Android APK to RC draft+ if: startsWith(github.ref_name, 'release/')uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0with:tag: ${{ env.RELEASE_TAG }}@@ -278,7 +302,31 @@ jobs:name: auth-sha256sum-linuxpath: mobile/apps/auth/artifacts/sha256sum-linux- - name: Upload Linux artifacts to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload Linux artifacts to nightly release+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ repo: nightly+ token: ${{ steps.nightly_token.outputs.token }}+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ artifacts: "mobile/apps/auth/artifacts/ente-auth-*.deb,mobile/apps/auth/artifacts/ente-auth-*.rpm,mobile/apps/auth/artifacts/ente-auth-*.AppImage"+ prerelease: true+ makeLatest: false+ allowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload Linux artifacts to RC draft+ if: startsWith(github.ref_name, 'release/')uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0with:tag: ${{ env.RELEASE_TAG }}@@ -407,7 +455,31 @@ jobs:name: auth-sha256sum-windowspath: mobile/apps/auth/artifacts/sha256sum-windows- - name: Upload Windows artifacts to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload Windows artifacts to nightly release+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ repo: nightly+ token: ${{ steps.nightly_token.outputs.token }}+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ artifacts: "mobile/apps/auth/artifacts/ente-auth-*.exe"+ prerelease: true+ makeLatest: false+ allowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload Windows artifacts to RC draft+ if: startsWith(github.ref_name, 'release/')uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0with:tag: ${{ env.RELEASE_TAG }}@@ -533,7 +605,31 @@ jobs:name: auth-sha256sum-macospath: mobile/apps/auth/artifacts/sha256sum-macos- - name: Upload macOS artifacts to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload macOS artifacts to nightly release+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ repo: nightly+ token: ${{ steps.nightly_token.outputs.token }}+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ artifacts: "mobile/apps/auth/artifacts/ente-auth-*.dmg"+ prerelease: true+ makeLatest: false+ allowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload macOS artifacts to RC draft+ if: startsWith(github.ref_name, 'release/')uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0with:tag: ${{ env.RELEASE_TAG }}@@ -631,6 +727,8 @@ jobs:needs: [build-metadata, build-android, build-linux, build-windows, build-macos, build-ios]if: needs.build-metadata.outputs.should_build == 'true'runs-on: ubuntu-latest+ environment:+ name: productionsteps:- name: Checkout built commit@@ -656,7 +754,23 @@ jobs:git tag --force "${RELEASE_TAG}" "${COMMIT_SHA}"git push --force origin "refs/tags/${RELEASE_TAG}"- - name: Upload checksum to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload checksum to nightly release+ env:+ GH_TOKEN: ${{ steps.nightly_token.outputs.token }}+ RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}+ run: gh release upload "${RELEASE_TAG}" sha256sum --clobber --repo ente-io/nightly++ - name: Upload checksum to RC draft+ if: startsWith(github.ref_name, 'release/')env:GH_TOKEN: ${{ github.token }}RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}@@ -666,8 +780,7 @@ jobs:continue-on-error: trueenv:DISCORD_WEBHOOK: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}- GH_TOKEN: ${{ github.token }}RELEASE_TITLE: ${{ needs.build-metadata.outputs.release_title }}RELEASE_BODY_GROUPED: ${{ needs.build-metadata.outputs.release_body_grouped }}RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}- run: node .github/scripts/release-notify.mjs auth "$(gh release view "${RELEASE_TAG}" --json url --jq .url)"+ run: node .github/scripts/release-notify.mjs auth "${RELEASE_TAG}"diff --git a/.github/workflows/ensu-build.yml b/.github/workflows/ensu-build.ymlindex 0fe94ccdb4..f320efb4af 100644--- a/.github/workflows/ensu-build.yml+++ b/.github/workflows/ensu-build.yml@@ -200,10 +200,20 @@ jobs:}EOF+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write+- name: Build and release Tauri app+ id: tauriuses: tauri-apps/tauri-action@84b9d35b5fc46c1e45415bdb6144030364f7ebc5 # v0.6.2env:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ GITHUB_TOKEN: ${{ steps.nightly_token.outputs.token }}TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.ENSU_TAURI_SIGNING_PRIVATE_KEY }}TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.ENSU_TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}APPLE_CERTIFICATE: ${{ secrets.MAC_OS_CERTIFICATE }}@@ -219,16 +229,43 @@ jobs:SIGNTOOL_PATH: ${{ env.SIGNTOOL_PATH }}with:projectPath: rust/apps/ensu+ repo: nightlytagName: ${{ env.RELEASE_TAG }}releaseName: ${{ env.RELEASE_TAG }}releaseBody: ${{ env.RELEASE_BODY }}- releaseCommitish: ${{ env.COMMIT_SHA }}- releaseDraft: true+ # Tag off nightly's default branch; the build commit isn't in that repo.+ releaseCommitish: main+ releaseDraft: false+ prerelease: trueincludeDebug: falseincludeRelease: trueincludeUpdaterJson: falseargs: ${{ format('--target {0} --bundles {1} --config tauri.ci.conf.json', matrix.platform.rust-target, matrix.platform.bundle-targets) }}+ # ncipollo globs `artifacts`; its glob breaks on Windows backslash paths.+ - name: Collect RC artifact list+ if: startsWith(github.ref_name, 'release/')+ id: rc_artifacts+ shell: bash+ env:+ ARTIFACT_PATHS: ${{ steps.tauri.outputs.artifactPaths }}+ run: |+ list="$(jq -rn 'env.ARTIFACT_PATHS | fromjson | map(gsub("\\\\"; "/")) | join(",")')"+ echo "list=${list}" >> "${GITHUB_OUTPUT}"++ - name: Upload desktop artifacts to RC draft+ if: startsWith(github.ref_name, 'release/')+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ commit: ${{ env.COMMIT_SHA }}+ artifacts: ${{ steps.rc_artifacts.outputs.list }}+ draft: true+ allowUpdates: true+ updateOnlyUnreleased: true+build-android:needs: build-metadataif: needs.build-metadata.outputs.should_build == 'true'@@ -299,16 +336,40 @@ jobs:mkdir -p artifactscp app-ui/build/outputs/apk/release/app-ui-release.apk "artifacts/${ANDROID_APK_NAME}"- - name: Upload Android APK to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload Android APK to nightly releaseuses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0with:+ repo: nightly+ token: ${{ steps.nightly_token.outputs.token }}tag: ${{ env.RELEASE_TAG }}name: ${{ env.RELEASE_TAG }}body: ${{ env.RELEASE_BODY }}- commit: ${{ env.COMMIT_SHA }}artifacts: mobile/native/android/apps/ensu/artifacts/${{ env.ANDROID_APK_NAME }}+ prerelease: true+ makeLatest: falseallowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload Android APK to RC draft+ if: startsWith(github.ref_name, 'release/')+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ commit: ${{ env.COMMIT_SHA }}+ artifacts: mobile/native/android/apps/ensu/artifacts/${{ env.ANDROID_APK_NAME }}draft: true+ allowUpdates: trueupdateOnlyUnreleased: true- name: Upload AAB to Play Store@@ -405,8 +466,7 @@ jobs:continue-on-error: trueenv:DISCORD_WEBHOOK: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}- GH_TOKEN: ${{ github.token }}RELEASE_TITLE: ${{ needs.build-metadata.outputs.release_title }}RELEASE_BODY_GROUPED: ${{ needs.build-metadata.outputs.release_body_grouped }}RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}- run: node .github/scripts/release-notify.mjs ensu "$(gh release view "${RELEASE_TAG}" --json url --jq .url)"+ run: node .github/scripts/release-notify.mjs ensu "${RELEASE_TAG}"diff --git a/.github/workflows/locker-build.yml b/.github/workflows/locker-build.ymlindex 58802642bd..994814a69a 100644--- a/.github/workflows/locker-build.yml+++ b/.github/workflows/locker-build.yml@@ -174,7 +174,31 @@ jobs:name: locker-sha256sum-androidpath: mobile/apps/locker/artifacts/sha256sum-apk- - name: Upload Android artifact to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload Android artifact to nightly release+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ repo: nightly+ token: ${{ steps.nightly_token.outputs.token }}+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ artifacts: "mobile/apps/locker/artifacts/ente-locker-*.apk"+ prerelease: true+ makeLatest: false+ allowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload Android artifact to RC draft+ if: startsWith(github.ref_name, 'release/')uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0with:tag: ${{ env.RELEASE_TAG }}@@ -287,6 +311,8 @@ jobs:needs: [build-metadata, build-android, build-ios]if: needs.build-metadata.outputs.should_build == 'true'runs-on: ubuntu-latest+ environment:+ name: productionsteps:- name: Checkout built commit@@ -312,7 +338,23 @@ jobs:git tag --force "${RELEASE_TAG}" "${COMMIT_SHA}"git push --force origin "refs/tags/${RELEASE_TAG}"- - name: Upload checksum to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload checksum to nightly release+ env:+ GH_TOKEN: ${{ steps.nightly_token.outputs.token }}+ RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}+ run: gh release upload "${RELEASE_TAG}" sha256sum --clobber --repo ente-io/nightly++ - name: Upload checksum to RC draft+ if: startsWith(github.ref_name, 'release/')env:GH_TOKEN: ${{ github.token }}RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}@@ -322,8 +364,7 @@ jobs:continue-on-error: trueenv:DISCORD_WEBHOOK: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}- GH_TOKEN: ${{ github.token }}RELEASE_TITLE: ${{ needs.build-metadata.outputs.release_title }}RELEASE_BODY_GROUPED: ${{ needs.build-metadata.outputs.release_body_grouped }}RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}- run: node .github/scripts/release-notify.mjs locker "$(gh release view "${RELEASE_TAG}" --json url --jq .url)"+ run: node .github/scripts/release-notify.mjs locker "${RELEASE_TAG}"diff --git a/.github/workflows/photos-build.yml b/.github/workflows/photos-build.ymlindex b75fda9aeb..e302a2de5b 100644--- a/.github/workflows/photos-build.yml+++ b/.github/workflows/photos-build.yml@@ -170,7 +170,31 @@ jobs:name: photos-sha256sum-androidpath: mobile/apps/photos/artifacts/sha256sum-apk- - name: Upload Android artifact to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload Android artifact to nightly release+ uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0+ with:+ repo: nightly+ token: ${{ steps.nightly_token.outputs.token }}+ tag: ${{ env.RELEASE_TAG }}+ name: ${{ env.RELEASE_TAG }}+ body: ${{ env.RELEASE_BODY }}+ artifacts: "mobile/apps/photos/artifacts/ente-photos-*.apk"+ prerelease: true+ makeLatest: false+ allowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload Android artifact to RC draft+ if: startsWith(github.ref_name, 'release/')uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0with:tag: ${{ env.RELEASE_TAG }}@@ -285,6 +309,8 @@ jobs:needs: [build-metadata, build-android, build-ios]if: needs.build-metadata.outputs.should_build == 'true'runs-on: ubuntu-latest+ environment:+ name: productionsteps:- name: Checkout built commit@@ -310,7 +336,23 @@ jobs:git tag --force "${RELEASE_TAG}" "${COMMIT_SHA}"git push --force origin "refs/tags/${RELEASE_TAG}"- - name: Upload checksum to GitHub release+ - name: Mint nightly token+ id: nightly_token+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0+ with:+ app-id: ${{ secrets.ENTE_CI_GH_APP_ID }}+ private-key: ${{ secrets.ENTE_CI_GH_APP_PRIVATE_KEY }}+ repositories: nightly+ permission-contents: write++ - name: Upload checksum to nightly release+ env:+ GH_TOKEN: ${{ steps.nightly_token.outputs.token }}+ RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}+ run: gh release upload "${RELEASE_TAG}" sha256sum --clobber --repo ente-io/nightly++ - name: Upload checksum to RC draft+ if: startsWith(github.ref_name, 'release/')env:GH_TOKEN: ${{ github.token }}RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}@@ -320,8 +362,7 @@ jobs:continue-on-error: trueenv:DISCORD_WEBHOOK: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}- GH_TOKEN: ${{ github.token }}RELEASE_TITLE: ${{ needs.build-metadata.outputs.release_title }}RELEASE_BODY_GROUPED: ${{ needs.build-metadata.outputs.release_body_grouped }}RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}- run: node .github/scripts/release-notify.mjs photos "$(gh release view "${RELEASE_TAG}" --json url --jq .url)"+ run: node .github/scripts/release-notify.mjs photos "${RELEASE_TAG}"