π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add Photos release workflow
Manav Rathi7c557a17b727
diff --git a/.github/docs/app-release.md b/.github/docs/app-release.mdindex dc37015ccf..37b4ebc040 100644--- a/.github/docs/app-release.md+++ b/.github/docs/app-release.md@@ -1,6 +1,6 @@# App release process-Auth, Locker, and Ensu use the same release process, as described here.+Photos, Auth, Locker, and Ensu 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`.>diff --git a/.github/docs/apple-signing.md b/.github/docs/apple-signing.mdindex 38e10f2182..7411cbb7a7 100644--- a/.github/docs/apple-signing.md+++ b/.github/docs/apple-signing.md@@ -146,7 +146,28 @@ Use the distribution channel as the profile name: `<App> App Store`.For another iOS app, reuse the same Apple Distribution certificate and App Store Connect API key, but create a separate App Store provisioning profile for that app's bundle ID.-If the app ships extensions, create one App ID and one App Store profile per shipped bundle ID. For example, Locker has two provisioning profiles: "Locker App Store" for `io.ente.locker` and "Locker Share Extension App Store" for `io.ente.locker.Share-Extension`.+If the app ships extensions, create one App ID and one App Store profile per shipped bundle ID.++Photos:++- `io.ente.frame` -> `Photos App Store`+- `io.ente.frame.ShareExtension` -> `Photos Share Extension App Store`+- `io.ente.frame.EnteAlbumWidget` -> `Photos Album Widget App Store`+- `io.ente.frame.EnteMemoryWidget` -> `Photos Memory Widget App Store`+- `io.ente.frame.EntePeopleWidget` -> `Photos People Widget App Store`++Auth:++- `io.ente.auth` -> `Auth App Store`++Locker:++- `io.ente.locker` -> `Locker App Store`+- `io.ente.locker.Share-Extension` -> `Locker Share Extension App Store`++Ensu:++- `io.ente.ensu` -> `Ensu App Store`### Entitlementsdiff --git a/.github/scripts/flutter-version.mjs b/.github/scripts/flutter-version.mjsindex 455a1db862..eff14e2e11 100644--- a/.github/scripts/flutter-version.mjs+++ b/.github/scripts/flutter-version.mjs@@ -12,7 +12,9 @@ function usage() {node .github/scripts/flutter-version.mjs auth getnode .github/scripts/flutter-version.mjs auth get-build-basenode .github/scripts/flutter-version.mjs auth set 4.4.23- node .github/scripts/flutter-version.mjs auth set-build 4.4.23 1007`);+ node .github/scripts/flutter-version.mjs auth set-build 4.4.23 1007++Valid apps: photos, auth, locker`);}if (!app) {diff --git a/.github/workflows/app-release.yml b/.github/workflows/app-release.ymlindex b1d24c87ff..cd3165012a 100644--- a/.github/workflows/app-release.yml+++ b/.github/workflows/app-release.yml@@ -10,6 +10,7 @@ on:required: truetype: choiceoptions:+ - photos- auth- locker- ensudiff --git a/.github/workflows/auth-build.yml b/.github/workflows/auth-build.ymlindex 30d58e1b63..5a6f29dd40 100644--- a/.github/workflows/auth-build.yml+++ b/.github/workflows/auth-build.yml@@ -8,8 +8,8 @@ on:- "release/auth-v*"workflow_dispatch:schedule:- # Run every weekday at ~5:15 AM IST- - cron: "45 23 * * 0-4"+ # Run every weekday at ~4:45 AM IST+ - cron: "15 23 * * 0-4"env:FLUTTER_VERSION: "3.38.10"diff --git a/.github/workflows/ensu-build.yml b/.github/workflows/ensu-build.ymlindex f76f65ba0a..1c28e07a0f 100644--- a/.github/workflows/ensu-build.yml+++ b/.github/workflows/ensu-build.yml@@ -8,8 +8,8 @@ on:- "release/ensu-v*"workflow_dispatch:schedule:- # Run every weekday at ~7:15 AM IST- - cron: "45 1 * * 1-5"+ # Run every weekday at ~6:45 AM IST+ - cron: "15 1 * * 1-5"env:NDK_VERSION: "27.3.13750724"diff --git a/.github/workflows/locker-build.yml b/.github/workflows/locker-build.ymlindex 1b0df8e0d0..ba2aeeee03 100644--- a/.github/workflows/locker-build.yml+++ b/.github/workflows/locker-build.yml@@ -8,8 +8,8 @@ on:- "release/locker-v*"workflow_dispatch:schedule:- # Run every weekday at ~6:15 AM IST- - cron: "45 0 * * 1-5"+ # Run every weekday at ~5:45 AM IST+ - cron: "15 0 * * 1-5"env:FLUTTER_VERSION: "3.38.10"diff --git a/.github/workflows/mobile-daily-internal.yml b/.github/workflows/mobile-daily-internal.ymldeleted file mode 100644index e1de913adc..0000000000--- a/.github/workflows/mobile-daily-internal.yml+++ /dev/null@@ -1,167 +0,0 @@-name: "Internal release (photos)"--on:- schedule:- # Runs daily at 12:30 UTC (6:00 PM IST)- - cron: "30 12 * * 1-3"- workflow_dispatch: # Allow manual trigger--env:- FLUTTER_VERSION: "3.38.10"--permissions:- contents: read--jobs:- build:- runs-on: ubuntu-latest-- defaults:- run:- working-directory: mobile/apps/photos-- steps:- - name: Checkout code- uses: actions/checkout@v6-- - name: Free Disk Space (Ubuntu)- uses: jlumbroso/free-disk-space@main- with:- android: false- dotnet: true- haskell: true- large-packages: true- docker-images: true- swap-storage: true- tool-cache: true-- - name: Setup JDK 17- uses: actions/setup-java@v1- with:- java-version: 17-- - name: Install Flutter ${{ env.FLUTTER_VERSION }}- uses: subosito/flutter-action@v2- with:- channel: "stable"- flutter-version: ${{ env.FLUTTER_VERSION }}- cache: true-- - name: Resolve dependencies with lockfile enforcement- run: flutter pub get --enforce-lockfile-- - run: cargo codegen frb- working-directory: rust-- - name: Increment version code for build- run: |- CURRENT_VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //')- VERSION_NAME=$(echo $CURRENT_VERSION | cut -d'+' -f1)- CURRENT_BUILD=$(echo $CURRENT_VERSION | cut -d'+' -f2)- NEW_VERSION_CODE=$((CURRENT_BUILD + ${{ github.run_number }}))- NEW_VERSION="${VERSION_NAME}+${NEW_VERSION_CODE}"-- sed -i "s/^version: .*/version: $NEW_VERSION/" pubspec.yaml- echo "Building with version ${NEW_VERSION}"-- # Store version for later use- echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV- echo "NEW_VERSION_CODE=${NEW_VERSION_CODE}" >> $GITHUB_ENV-- - name: Prepare and validate changelog for Play Store- run: |- mkdir -p whatsnew- CHANGELOG_FILE="scripts/store_changes.txt"- DISCORD_FILE="scripts/internal_changes.txt"- OUTPUT_FILE="whatsnew/whatsnew-en-US"-- # Use provided changelog or fallback- if [ -f "$CHANGELOG_FILE" ]; then- head -c 500 "$CHANGELOG_FILE" > "$OUTPUT_FILE"- else- echo "Bug fixes and improvements" > "$OUTPUT_FILE"- fi-- # Validate: file exists- if [ ! -s "$OUTPUT_FILE" ]; then- echo "β Changelog is empty."- exit 1- fi-- # Validate: <= 500 chars- LENGTH=$(wc -m < "$OUTPUT_FILE")- if [ "$LENGTH" -gt 500 ]; then- echo "β Changelog exceeds 500 characters ($LENGTH)."- exit 1- fi-- # Validate: no markdown or HTML- if grep -Eq '[\*\_\<\>\[\]\(\)]' "$OUTPUT_FILE"; then- echo "β Changelog contains markdown/HTML formatting."- exit 1- fi-- echo "β Changelog valid:"- cat "$OUTPUT_FILE"-- # Store changelog for Play Store (with escaped newlines)- CHANGELOG_PLAYSTORE=$(cat "$OUTPUT_FILE" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')- echo "CHANGELOG=${CHANGELOG_PLAYSTORE}" >> $GITHUB_ENV-- # Store changelog for Discord (with proper newlines)- CHANGELOG_DISCORD=$(cat "$DISCORD_FILE" | sed 's/"/\\"/g')- echo "CHANGELOG_DISCORD<<EOF" >> $GITHUB_ENV- echo "$CHANGELOG_DISCORD" >> $GITHUB_ENV- echo "EOF" >> $GITHUB_ENV-- - name: Add keystore- run: echo "${{ secrets.SIGNING_KEY_PHOTOS }}" | base64 -d > "$RUNNER_TEMP/ente_photos_key.jks"-- - name: Disk report (before build)- run: |- echo "=== Disk space (df -h) ==="- df -h- echo ""- echo "=== Inodes (df -i) ==="- df -i- echo ""- echo "=== Largest cache directories (top 50) ==="- du -xh -d 2 "$HOME/.gradle" "$HOME/.pub-cache" "$HOME/.cargo" 2>/dev/null | sort -h | tail -n 50 || true- echo ""- echo "=== Largest workspace directories (android/build) (top 50) ==="- du -xh -d 3 "$GITHUB_WORKSPACE/mobile/apps/photos/android" "$GITHUB_WORKSPACE/mobile/apps/photos/build" 2>/dev/null | sort -h | tail -n 50 || true-- - name: Build PlayStore AAB- run: |- flutter build appbundle --dart-define=cronetHttpNoPlay=true --release --flavor playstore --target-platform android-arm,android-arm64- env:- SIGNING_KEY_PATH: ${{ runner.temp }}/ente_photos_key.jks- SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}- SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}- SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}-- - name: Upload AAB to PlayStore- uses: r0adkll/upload-google-play@v1- with:- serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}- packageName: io.ente.photos- releaseFiles: mobile/apps/photos/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab- track: internal- whatsNewDirectory: mobile/apps/photos/whatsnew- mappingFile: mobile/apps/photos/build/app/outputs/mapping/playstoreRelease/mapping.txt-- - name: Notify Discord- uses: sarisia/actions-status-discord@v1- with:- webhook: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}- nodetail: true- title: "π Nightly build Photos v${{ env.NEW_VERSION }} (Branch: ${{ github.ref_name }})"- description: |- **Version:** ${{ env.NEW_VERSION }}- **Flutter:** ${{ env.FLUTTER_VERSION }}- **Commit:** [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})- **Download:** [Play Store](https://play.google.com/store/apps/details?id=io.ente.photos)- **Sentry:** [Exceptions](https://sentry.ente.com/organizations/ente/issues/?environment=production&project=2&query=release.build%3A%3E%3D${{ env.NEW_VERSION_CODE }}&referrer=issue-list&statsPeriod=7d)- **Changes:**- ${{ env.CHANGELOG_DISCORD }}- color: 0x00ff00diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.ymlindex a7d728b7b2..2db58b3bce 100644--- a/.github/workflows/mobile-lint.yml+++ b/.github/workflows/mobile-lint.yml@@ -25,7 +25,7 @@ permissions:jobs:photos-lint:- runs-on: ubuntu-latest+ runs-on: macos-26defaults:run:working-directory: mobile/apps/photos@@ -50,6 +50,10 @@ jobs:- run: flutter pub get --enforce-lockfile+ - name: Check iOS Podfile.lock is current+ run: pod install --deployment+ working-directory: mobile/apps/photos/ios+- run: cargo codegen frbworking-directory: rustdiff --git a/.github/workflows/mobile-release.yml b/.github/workflows/mobile-release.ymldeleted file mode 100644index c527cca92e..0000000000--- a/.github/workflows/mobile-release.yml+++ /dev/null@@ -1,99 +0,0 @@-name: "Release (photos independent)"--on:- workflow_dispatch: # Allow manually running the action- push:- # Run when a tag matching the pattern "photos-v*"" is pushed- # See: [Note: Testing release workflows that are triggered by tags]- tags:- - "photos-v*"--env:- FLUTTER_VERSION: "3.38.10"--permissions:- contents: write--jobs:- build:- runs-on: ubuntu-latest-- defaults:- run:- working-directory: mobile/apps/photos-- steps:- - name: Checkout code- uses: actions/checkout@v6-- - name: Free up disk space- run: |- echo "Initial disk usage:"- df -h /- # Get available space in KB- INITIAL=$(df / | awk 'NR==2 {print $4}')-- echo -e "\n=== Removing .NET SDK (~20-25GB) ==="- BEFORE=$(df / | awk 'NR==2 {print $4}')- START=$(date +%s)- sudo rm -rf /usr/share/dotnet- END=$(date +%s)- AFTER=$(df / | awk 'NR==2 {print $4}')- FREED=$(( (AFTER - BEFORE) / 1048576 )) # Convert KB to GB- echo "Time: $((END-START))s | Freed: ${FREED}GB"-- echo -e "\n=== Removing cached tools (~5-10GB) ==="- BEFORE=$(df / | awk 'NR==2 {print $4}')- START=$(date +%s)- sudo rm -rf "$AGENT_TOOLSDIRECTORY"- END=$(date +%s)- AFTER=$(df / | awk 'NR==2 {print $4}')- FREED=$(( (AFTER - BEFORE) / 1048576 ))- echo "Time: $((END-START))s | Freed: ${FREED}GB"-- echo -e "\n=== Final Summary ==="- FINAL=$(df / | awk 'NR==2 {print $4}')- TOTAL_FREED=$(( (FINAL - INITIAL) / 1048576 ))- echo "Total space freed: ${TOTAL_FREED}GB"- echo "Final disk usage:"- df -h /-- - name: Setup JDK 17- uses: actions/setup-java@v1- with:- java-version: 17-- - name: Install Flutter ${{ env.FLUTTER_VERSION }}- uses: subosito/flutter-action@v2- with:- channel: "stable"- flutter-version: ${{ env.FLUTTER_VERSION }}- cache: true-- - name: Resolve dependencies with lockfile enforcement- run: flutter pub get --enforce-lockfile-- - run: cargo codegen frb- working-directory: rust-- - name: Add keystore- run: echo "${{ secrets.SIGNING_KEY_PHOTOS }}" | base64 -d > "$RUNNER_TEMP/ente_photos_key.jks"-- - name: Build independent APK- run: |- flutter build apk --dart-define=cronetHttpNoPlay=true --release --flavor independent --target-platform android-arm,android-arm64- mv build/app/outputs/flutter-apk/app-independent-release.apk build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk- env:- SIGNING_KEY_PATH: ${{ runner.temp }}/ente_photos_key.jks- SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}- SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}- SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}-- - name: Checksum- run: sha256sum build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk > build/app/outputs/flutter-apk/sha256sum-- - name: Create a draft GitHub release- uses: ncipollo/release-action@v1- with:- artifacts: "mobile/apps/photos/build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk,mobile/apps/photos/build/app/outputs/flutter-apk/sha256sum"- draft: truediff --git a/.github/workflows/photos-build.yml b/.github/workflows/photos-build.ymlnew file mode 100644index 0000000000..3de39ed3a4--- /dev/null+++ b/.github/workflows/photos-build.yml@@ -0,0 +1,353 @@+name: "Build (Photos)"++# See .github/docs/app-release.md++on:+ push:+ branches:+ - "release/photos-v*"+ workflow_dispatch:+ schedule:+ # Run every weekday at ~3:45 AM IST+ - cron: "15 22 * * 0-4"++env:+ FLUTTER_VERSION: "3.38.10"++permissions:+ contents: write++concurrency:+ group: photos-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 }}+ build_number: ${{ steps.prepare.outputs.build_number }}+ release_version: ${{ steps.prepare.outputs.release_version }}+ release_tag: ${{ steps.prepare.outputs.release_tag }}+ release_title: ${{ steps.prepare.outputs.release_title }}+ release_body: ${{ steps.prepare.outputs.release_body }}+ release_body_grouped: ${{ steps.prepare.outputs.release_body_grouped }}+ artifact_stem: ${{ steps.prepare.outputs.artifact_stem }}++ 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-v*' >/dev/null 2>&1; then+ echo "Active Photos release branch found; skipping scheduled nightly"+ echo "should_build=false" >> "${GITHUB_OUTPUT}"+ exit 0+ fi++ release_version="$(node .github/scripts/flutter-version.mjs photos get)"+ build_number_base="$(node .github/scripts/flutter-version.mjs photos get-build-base)"+ build_number=$((build_number_base + GITHUB_RUN_NUMBER))++ if [[ "${GITHUB_REF_NAME}" == release/photos-v* ]]; then+ if [[ "${GITHUB_REF_NAME}" != "release/photos-v${release_version}" ]]; then+ echo "::error::Branch ${GITHUB_REF_NAME} does not match Photos version ${release_version}"+ exit 1+ fi+ release_tag="photos-v${release_version}-rc"+ release_title="π» Photos release candidate - ${release_version} (build ${build_number})"+ else+ release_tag="photos-v${release_version}-beta"+ release_title="π» Photos nightly - ${release_version} (build ${build_number})"+ fi++ commit_sha="$(git rev-parse HEAD)"+ git fetch --force --depth=1 --no-tags origin "refs/tags/${release_tag}:refs/tags/${release_tag}" || true++ echo "should_build=true" >> "${GITHUB_OUTPUT}"+ echo "commit_sha=${commit_sha}" >> "${GITHUB_OUTPUT}"+ echo "build_number=${build_number}" >> "${GITHUB_OUTPUT}"+ echo "release_version=${release_version}" >> "${GITHUB_OUTPUT}"+ echo "release_tag=${release_tag}" >> "${GITHUB_OUTPUT}"+ echo "release_title=${release_title}" >> "${GITHUB_OUTPUT}"+ echo "artifact_stem=ente-${release_tag%-rc}" >> "${GITHUB_OUTPUT}"+ node .github/scripts/release-notes.mjs mobile/apps/photos/changes "${release_tag}" >> "${GITHUB_OUTPUT}"++ build-android:+ needs: build-metadata+ if: needs.build-metadata.outputs.should_build == 'true'+ runs-on: ubuntu-latest+ environment:+ name: production+ env:+ COMMIT_SHA: ${{ needs.build-metadata.outputs.commit_sha }}+ BUILD_NUMBER: ${{ needs.build-metadata.outputs.build_number }}+ RELEASE_VERSION: ${{ needs.build-metadata.outputs.release_version }}+ RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}+ RELEASE_BODY: ${{ needs.build-metadata.outputs.release_body }}+ ARTIFACT_STEM: ${{ needs.build-metadata.outputs.artifact_stem }}++ defaults:+ run:+ working-directory: mobile/apps/photos++ steps:+ - name: Checkout+ uses: actions/checkout@v6+ with:+ ref: ${{ needs.build-metadata.outputs.commit_sha }}++ - name: Setup JDK 17+ uses: actions/setup-java@v5+ with:+ distribution: "temurin"+ java-version: "17"++ - name: Install Flutter ${{ env.FLUTTER_VERSION }}+ uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0+ with:+ channel: "stable"+ flutter-version: ${{ env.FLUTTER_VERSION }}+ cache: true++ - name: Set build version+ run: node ../../../.github/scripts/flutter-version.mjs photos set-build "${RELEASE_VERSION}" "${BUILD_NUMBER}"++ - name: Resolve dependencies with lockfile enforcement+ run: flutter pub get --enforce-lockfile++ - run: cargo codegen frb+ working-directory: rust++ - name: Prepare whatsnew+ run: |+ mkdir -p whatsnew+ if [ -n "${RELEASE_BODY}" ]; then+ printf '%s' "${RELEASE_BODY}" | head -c 500 > whatsnew/whatsnew-en-US+ else+ printf '%s\n' "Bug fixes and improvements" > whatsnew/whatsnew-en-US+ fi++ - name: Add keystore+ run: printf '%s' "${SIGNING_KEY_PHOTOS}" | base64 -d > "$RUNNER_TEMP/ente_photos_key.jks"+ env:+ SIGNING_KEY_PHOTOS: ${{ secrets.SIGNING_KEY_PHOTOS }}++ - name: Create artifacts directory+ run: mkdir artifacts++ - name: Build independent APK+ run: |+ flutter build apk --build-name="${RELEASE_VERSION}" --build-number="${BUILD_NUMBER}" --dart-define=cronetHttpNoPlay=true --release --flavor independent --target-platform android-arm,android-arm64+ mv build/app/outputs/flutter-apk/app-independent-release.apk "artifacts/${ARTIFACT_STEM}.apk"+ env:+ SIGNING_KEY_PATH: ${{ runner.temp }}/ente_photos_key.jks+ SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}+ SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}+ SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}++ - name: Build PlayStore AAB+ run: flutter build appbundle --build-name="${RELEASE_VERSION}" --build-number="${BUILD_NUMBER}" --dart-define=cronetHttpNoPlay=true --release --flavor playstore --target-platform android-arm,android-arm64+ env:+ SIGNING_KEY_PATH: ${{ runner.temp }}/ente_photos_key.jks+ SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}+ SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}+ SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}++ - name: Generate checksums+ run: sha256sum artifacts/ente-photos-*.apk > artifacts/sha256sum-apk++ - name: Upload checksum snippet+ uses: actions/upload-artifact@v4+ with:+ name: photos-sha256sum-android+ path: mobile/apps/photos/artifacts/sha256sum-apk++ - name: Upload Android artifact to GitHub 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/apps/photos/artifacts/ente-photos-*.apk"+ draft: true+ allowUpdates: true+ updateOnlyUnreleased: true++ - name: Upload AAB to PlayStore+ uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5+ with:+ serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}+ packageName: io.ente.photos+ releaseFiles: mobile/apps/photos/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab+ tracks: internal+ whatsNewDirectory: mobile/apps/photos/whatsnew+ mappingFile: mobile/apps/photos/build/app/outputs/mapping/playstoreRelease/mapping.txt++ build-ios:+ needs: build-metadata+ if: needs.build-metadata.outputs.should_build == 'true'+ runs-on: macos-26+ environment:+ name: production+ env:+ BUILD_NUMBER: ${{ needs.build-metadata.outputs.build_number }}+ RELEASE_VERSION: ${{ needs.build-metadata.outputs.release_version }}++ defaults:+ run:+ working-directory: mobile/apps/photos++ steps:+ - name: Checkout code+ uses: actions/checkout@v6+ with:+ ref: ${{ needs.build-metadata.outputs.commit_sha }}++ - name: Install Flutter ${{ env.FLUTTER_VERSION }}+ uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0+ with:+ channel: "stable"+ flutter-version: ${{ env.FLUTTER_VERSION }}+ cache: true++ - name: Set build version+ run: node ../../../.github/scripts/flutter-version.mjs photos set-build "${RELEASE_VERSION}" "${BUILD_NUMBER}"++ - name: Resolve dependencies with lockfile enforcement+ run: flutter pub get --enforce-lockfile++ - run: cargo codegen frb+ working-directory: rust++ - name: Install iOS pods+ run: pod install --deployment+ working-directory: mobile/apps/photos/ios++ - name: Import Apple Distribution certificate+ uses: Apple-Actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7.0.0+ with:+ p12-file-base64: ${{ secrets.APPLE_DISTRIBUTION_CERT_BASE64 }}+ p12-password: ${{ secrets.APPLE_DISTRIBUTION_CERT_PASSWORD }}++ - name: Archive and upload Photos to TestFlight+ env:+ ASC_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}+ ASC_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}+ ASC_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}+ run: |+ key_path="${RUNNER_TEMP}/AuthKey_${ASC_KEY_ID}.p8"+ printf '%s' "${ASC_API_KEY_BASE64}" | base64 --decode > "${key_path}"++ xcodebuild archive \+ -workspace ios/Runner.xcworkspace \+ -scheme Runner \+ -configuration Release \+ -destination 'generic/platform=iOS' \+ -archivePath build/ios/archive/Runner.xcarchive \+ -allowProvisioningUpdates \+ -authenticationKeyPath "${key_path}" \+ -authenticationKeyID "${ASC_KEY_ID}" \+ -authenticationKeyIssuerID "${ASC_ISSUER_ID}" \+ CODE_SIGN_STYLE=Manual \+ CODE_SIGN_IDENTITY="Apple Distribution" \+ DEVELOPMENT_TEAM="${APPLE_TEAM_ID}" \+ APP_STORE_PROFILE_SPECIFIER="Photos App Store" \+ SHARE_EXTENSION_APP_STORE_PROFILE_SPECIFIER="Photos Share Extension App Store" \+ ALBUM_WIDGET_APP_STORE_PROFILE_SPECIFIER="Photos Album Widget App Store" \+ MEMORY_WIDGET_APP_STORE_PROFILE_SPECIFIER="Photos Memory Widget App Store" \+ PEOPLE_WIDGET_APP_STORE_PROFILE_SPECIFIER="Photos People Widget App Store" \+ MARKETING_VERSION="${RELEASE_VERSION}" \+ CURRENT_PROJECT_VERSION="${BUILD_NUMBER}"++ xcodebuild -exportArchive \+ -archivePath build/ios/archive/Runner.xcarchive \+ -exportPath build/ios/export \+ -exportOptionsPlist scripts/ExportOptions-AppStore-CI.plist \+ -allowProvisioningUpdates \+ -authenticationKeyPath "${key_path}" \+ -authenticationKeyID "${ASC_KEY_ID}" \+ -authenticationKeyIssuerID "${ASC_ISSUER_ID}"++ finish-build:+ needs: [build-metadata, build-android, build-ios]+ if: needs.build-metadata.outputs.should_build == 'true'+ runs-on: ubuntu-latest++ steps:+ - name: Checkout built commit+ uses: actions/checkout@v6+ with:+ ref: ${{ needs.build-metadata.outputs.commit_sha }}++ - name: Download checksum snippets+ uses: actions/download-artifact@v4+ with:+ pattern: photos-sha256sum-*+ path: checksums+ merge-multiple: true++ - name: Combine checksums+ run: cat checksums/sha256sum-* > sha256sum++ - name: Point release tag at the successfully built commit+ env:+ COMMIT_SHA: ${{ needs.build-metadata.outputs.commit_sha }}+ RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}+ run: |+ git tag --force "${RELEASE_TAG}" "${COMMIT_SHA}"+ git push --force origin "refs/tags/${RELEASE_TAG}"++ - name: Upload checksum to GitHub release+ env:+ GH_TOKEN: ${{ github.token }}+ RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}+ run: gh release upload "${RELEASE_TAG}" sha256sum --clobber++ - name: Notify Discord+ continue-on-error: true+ env:+ DISCORD_WEBHOOK: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}+ GH_TOKEN: ${{ github.token }}+ RELEASE_BODY_GROUPED: ${{ needs.build-metadata.outputs.release_body_grouped }}+ RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}+ run: |+ release_url="$(gh release view "${RELEASE_TAG}" --json url --jq .url)"+ download_line="-# Download: [Play Store](https://play.google.com/store/apps/details?id=io.ente.photos) | [TestFlight](https://appstoreconnect.apple.com/apps/1542026904/testflight/ios) | [GitHub Release](${release_url})"+ release_body_discord="$(awk '+ /^Previous changes:$/ { previous = 1 }+ previous && NF { print "-# " $0; next }+ { print }+ ' <<< "${RELEASE_BODY_GROUPED}")"+ if [ "${#release_body_discord}" -gt 3000 ]; then+ release_body_discord="${release_body_discord:0:3000}"$'\n...\n-# See the GitHub release for full notes.'+ fi++ jq -n \+ --arg title "${{ needs.build-metadata.outputs.release_title }}" \+ --arg body "${release_body_discord}" \+ --arg download_line "${download_line}" \+ '{+ flags: 32768,+ components: [{+ type: 17,+ accent_color: 65280,+ components: (+ [{type: 10, content: ("## " + $title)}]+ + (if $body == "" then [] else [{type: 10, content: $body}] end)+ + [{type: 14}, {type: 10, content: $download_line}]+ )+ }]+ }' \+ | curl -fsSL -H 'Content-Type: application/json' -d @- "${DISCORD_WEBHOOK}?with_components=true"diff --git a/mobile/apps/photos/README.md b/mobile/apps/photos/README.mdindex 6b4810df24..aa0bf9cc2e 100644--- a/mobile/apps/photos/README.md+++ b/mobile/apps/photos/README.md@@ -41,7 +41,7 @@ You can alternatively install the build from PlayStore or F-Droid.2. Install dependencies and generate Rust bindings using one of these methods:- **Using Melos (recommended):** Install Melos with `dart pub global activate melos`, then from any folder inside `mobile/`, run `melos bootstrap` and `melos run codegen:rust`.- - **Using Flutter directly:** Run `flutter pub get`, then from `rust/`, run `cargo codegen frb`.+ - **Using Flutter directly:** Run `flutter pub get --enforce-lockfile`, then from `rust/`, run `cargo codegen frb`.3. Run the app:- Android: `flutter run --flavor independent`@@ -59,6 +59,10 @@ You can alternatively install the build from PlayStore or F-Droid.To build a release APK, [setup your keystore](https://docs.flutter.dev/deployment/android#create-an-upload-keystore) and run `flutter build apk --release --flavor independent`. For iOS, use `flutter build ios`.+### Updating dependencies++After updating Flutter dependencies, run `pod install` from `ios/` on macOS and commit `ios/Podfile.lock` if it changes.+## π LocalizationThis project uses Flutter's built-in localization system configured via `l10n.yaml`.diff --git a/mobile/apps/photos/changes/README.md b/mobile/apps/photos/changes/README.mdnew file mode 100644index 0000000000..c0880f0fda--- /dev/null+++ b/mobile/apps/photos/changes/README.md@@ -0,0 +1,7 @@+For each user facing change, create a new `arbitrary-slug.md`, e.g.:++```md+- Added support for importing photos from another app.+```++All these files are concatenated in alphabetical order for the release notes.diff --git a/mobile/apps/photos/docs/release.md b/mobile/apps/photos/docs/release.mdindex ee9c7609fd..c5e665b14b 100644--- a/mobile/apps/photos/docs/release.md+++ b/mobile/apps/photos/docs/release.md@@ -1,29 +1,6 @@# Releases-Create a PR to bump up the version in `pubspec.yaml`.--> [!NOTE]->-> Use [semver](https://semver.org/) for the tags, with `photos-` as a prefix. Multiple beta releases for the same upcoming version can be done by adding build metadata at the end, e.g. `photos-v1.2.3-beta+3`.--Once that is merged, tag main, and push the tag.--```sh-git tag photos-v1.2.3-git push origin photos-v1.2.3-```--This'll trigger a GitHub workflow that:--- Creates a new draft GitHub release and attaches the build artifacts to it (mobile APKs),--Once the workflow completes, go to the draft GitHub release that was created.--> [!NOTE]->-> Keep the title of the release same as the tag.--Set "Previous tag" to the last release of auth and press "Generate release notes". The generated release note will contain all PRs and new contributors from all the releases in the monorepo, so you'll need to filter them to keep only the things that relate to the Photos mobile app.+Photos uses the shared app release process documented in `.github/docs/app-release.md`.## F-Droiddiff --git a/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxproj b/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxprojindex f742ae17a1..2731717873 100644--- a/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxproj+++ b/mobile/apps/photos/ios/Runner.xcodeproj/project.pbxproj@@ -1131,6 +1131,7 @@MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame.ShareExtension;PRODUCT_NAME = "$(TARGET_NAME)";+ PROVISIONING_PROFILE_SPECIFIER = "$(SHARE_EXTENSION_APP_STORE_PROFILE_SPECIFIER)";SKIP_INSTALL = YES;STRING_CATALOG_GENERATE_SYMBOLS = YES;SWIFT_APPROACHABLE_CONCURRENCY = YES;@@ -1388,7 +1389,7 @@MARKETING_VERSION = 0.0.11;PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame;PRODUCT_NAME = "$(TARGET_NAME)";- PROVISIONING_PROFILE_SPECIFIER = "";+ PROVISIONING_PROFILE_SPECIFIER = "$(APP_STORE_PROFILE_SPECIFIER)";SWIFT_ENABLE_EXPLICIT_MODULES = NO;SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";SWIFT_VERSION = 5.0;@@ -1472,6 +1473,7 @@MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame.EnteAlbumWidget;PRODUCT_NAME = "$(TARGET_NAME)";+ PROVISIONING_PROFILE_SPECIFIER = "$(ALBUM_WIDGET_APP_STORE_PROFILE_SPECIFIER)";SKIP_INSTALL = YES;SWIFT_EMIT_LOC_STRINGS = YES;SWIFT_VERSION = 5.0;@@ -1594,6 +1596,7 @@MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame.EntePeopleWidget;PRODUCT_NAME = "$(TARGET_NAME)";+ PROVISIONING_PROFILE_SPECIFIER = "$(PEOPLE_WIDGET_APP_STORE_PROFILE_SPECIFIER)";SKIP_INSTALL = YES;SWIFT_EMIT_LOC_STRINGS = YES;SWIFT_VERSION = 5.0;@@ -1716,6 +1719,7 @@MTL_FAST_MATH = YES;PRODUCT_BUNDLE_IDENTIFIER = io.ente.frame.EnteMemoryWidget;PRODUCT_NAME = "$(TARGET_NAME)";+ PROVISIONING_PROFILE_SPECIFIER = "$(MEMORY_WIDGET_APP_STORE_PROFILE_SPECIFIER)";SKIP_INSTALL = YES;SWIFT_EMIT_LOC_STRINGS = YES;SWIFT_VERSION = 5.0;diff --git a/mobile/apps/photos/ios/ShareExtension/Info.plist b/mobile/apps/photos/ios/ShareExtension/Info.plistindex ef334dc8db..387679a8f3 100644--- a/mobile/apps/photos/ios/ShareExtension/Info.plist+++ b/mobile/apps/photos/ios/ShareExtension/Info.plist@@ -4,8 +4,6 @@<dict><key>AppGroupId</key><string>$(CUSTOM_GROUP_ID)</string>- <key>CFBundleVersion</key>- <string>$(FLUTTER_BUILD_NUMBER)</string><key>NSExtension</key><dict><key>NSExtensionAttributes</key>diff --git a/mobile/apps/photos/pubspec.yaml b/mobile/apps/photos/pubspec.yamlindex 5b605f78d5..f004159fd5 100644--- a/mobile/apps/photos/pubspec.yaml+++ b/mobile/apps/photos/pubspec.yaml@@ -12,7 +12,7 @@ description: ente photos application# Read more about iOS versioning at# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html-version: 1.3.55+1795+version: 1.3.56+2158publish_to: noneenvironment:diff --git a/mobile/apps/photos/scripts/ExportOptions-AppStore-CI.plist b/mobile/apps/photos/scripts/ExportOptions-AppStore-CI.plistnew file mode 100644index 0000000000..90cd4a79b1--- /dev/null+++ b/mobile/apps/photos/scripts/ExportOptions-AppStore-CI.plist@@ -0,0 +1,31 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>method</key>+ <string>app-store-connect</string>+ <key>signingStyle</key>+ <string>manual</string>+ <key>teamID</key>+ <string>6Z68YJY9Q2</string>+ <key>destination</key>+ <string>upload</string>+ <key>manageAppVersionAndBuildNumber</key>+ <false/>+ <key>signingCertificate</key>+ <string>Apple Distribution</string>+ <key>provisioningProfiles</key>+ <dict>+ <key>io.ente.frame</key>+ <string>Photos App Store</string>+ <key>io.ente.frame.ShareExtension</key>+ <string>Photos Share Extension App Store</string>+ <key>io.ente.frame.EnteAlbumWidget</key>+ <string>Photos Album Widget App Store</string>+ <key>io.ente.frame.EnteMemoryWidget</key>+ <string>Photos Memory Widget App Store</string>+ <key>io.ente.frame.EntePeopleWidget</key>+ <string>Photos People Widget App Store</string>+ </dict>+</dict>+</plist>diff --git a/mobile/apps/photos/scripts/bump_version.sh b/mobile/apps/photos/scripts/bump_version.shdeleted file mode 100755index 3f00b36e58..0000000000--- a/mobile/apps/photos/scripts/bump_version.sh+++ /dev/null@@ -1,42 +0,0 @@-#!/bin/bash--# Exit immediately if a command exits with a non-zero status-set -e--# Go to the project root directory-cd "$(dirname "$0")/.."--# Check that there are no uncommitted changes-git diff-index --quiet HEAD ---if [ $? -ne 0 ]; then- echo "Error: There are uncommitted changes"- exit 1-fi--# Check that the current branch is main-if [[ $(git rev-parse --abbrev-ref HEAD) != "main" ]]; then- echo "Error: Not on main branch"- exit 1-fi--# Pull the latest changes from main branch-git pull origin main--# Create a new branch with the current date and time as a suffix-new_branch="bump-version-$(date +'%Y%m%d%H%M%S')"-git checkout -b "$new_branch"--# Find the version line in pubspec.yaml-version_line=$(grep -E '^version:' pubspec.yaml)--# Extract and bump the version number and code-new_version=$(echo $version_line | awk -F '[.+]' '{printf "version: 0.%s.%d+%d", $2, $3+1, $4+1}')--# Replace the version line in pubspec.yaml (macOS compatible)-sed -i '' "s/$version_line/$new_version/" pubspec.yaml--# Commit the version bump with new_version in the commit message-git add pubspec.yaml-git commit -m "Bump $new_version"--gh pr create --fill -r ashilkn --base maindiff --git a/mobile/apps/photos/scripts/check_fdroid_overlay.sh b/mobile/apps/photos/scripts/check_fdroid_overlay.shindex 65cdff7561..0840be171f 100755--- a/mobile/apps/photos/scripts/check_fdroid_overlay.sh+++ b/mobile/apps/photos/scripts/check_fdroid_overlay.sh@@ -24,7 +24,7 @@ trap cleanup EXITgit -C "$repo_root" worktree add --detach "$worktree" HEAD >/dev/null-git -C "$repo_root" diff --binary HEAD -- "$app_rel" .github/workflows/mobile-release.yml > "$tmp_root/current.patch"+git -C "$repo_root" diff --binary HEAD -- "$app_rel" > "$tmp_root/current.patch"if [[ -s "$tmp_root/current.patch" ]]; thengit -C "$worktree" apply "$tmp_root/current.patch"fidiff --git a/mobile/apps/photos/scripts/internal_changes.txt b/mobile/apps/photos/scripts/internal_changes.txtdeleted file mode 100644index 57be72f59c..0000000000--- a/mobile/apps/photos/scripts/internal_changes.txt+++ /dev/null@@ -1,14 +0,0 @@-Latest changes:--Still behind internal flag:-- Amrithesh: (I) ML/Pet recognition [Indexing]-- Aman: (I) Use Rust HEIC decoder for Android photo viewer when dimensions are known-- Laurens: (I) Use cloudflare worker for upload for internal users-- Neeraj: (I) Add internal-only resumable gallery download queue with persistence/restart fixes and completion banner updates-- Neeraj: (i) Save Contact-- Prateek: (i) Enable BG sync notifications by default for internal users on iOS-- Prateek: (i) Add internal sync recovery diagnostics to classify local discovery vs remote upload-prep misses--Still gated by rollout:-- Laurens: Clip text encoding in rust-- Laurens: Use rust indexing ML pipeline