π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob] Modify daily build workflow
Neeraj Gupta49c966f50c05
diff --git a/.github/workflows/mobile-daily-internal.yml b/.github/workflows/mobile-daily-internal.ymlindex 7002bea278..1cb30afe02 100644--- a/.github/workflows/mobile-daily-internal.yml+++ b/.github/workflows/mobile-daily-internal.yml@@ -1,118 +1,134 @@name: "Internal release (photos)"on:- schedule:- # Runs daily at 12:30 UTC (6:00 PM IST)- - cron: "30 12 * * *"- workflow_dispatch: # Allow manual trigger+ schedule:+ # Runs daily at 12:30 UTC (6:00 PM IST)+ - cron: "30 12 * * *"+ workflow_dispatch: # Allow manual triggerenv:- FLUTTER_VERSION: "3.24.3"+ FLUTTER_VERSION: "3.24.3"permissions:- contents: read+ contents: readjobs:- build:- runs-on: ubuntu-latest-- defaults:- run:- working-directory: mobile/apps/photos-- steps:- - name: Checkout code and submodules- uses: actions/checkout@v4- with:- submodules: recursive-- - 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: Increment version code for build- run: |- CURRENT_VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //')- VERSION_NAME=$(echo $CURRENT_VERSION | cut -d'+' -f1)- NEW_BUILD=$(date +%Y%m%d%H%M)- NEW_VERSION="${VERSION_NAME}+${NEW_BUILD}"-- sed -i "s/^version: .*/version: $NEW_VERSION/" pubspec.yaml- echo "Building with version ${NEW_VERSION}"-- - name: Prepare and validate changelog for Play Store- run: |- mkdir -p whatsnew- CHANGELOG_FILE="scripts/changes.txt"- OUTPUT_FILE="whatsnew/en-US.txt"-- # 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"-- - name: Setup keys- uses: timheuer/base64-to-file@v1- with:- fileName: "keystore/ente_photos_key.jks"- encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}-- - name: Build PlayStore AAB- run: |- flutter build appbundle --dart-define=cronetHttpNoPlay=true --release --flavor playstore- env:- SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/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: "π Daily release Photos (Branch: ${{ github.ref_name }})"- description: "[Download](https://play.google.com/store/apps/details?id=io.ente.photos) | [Changelog](https://github.com/ente-io/ente/blob/main/mobile/apps/photos/scripts/changes.txt)"- color: 0x00ff00+ build:+ runs-on: ubuntu-latest++ defaults:+ run:+ working-directory: mobile/apps/photos++ steps:+ - name: Checkout code and submodules+ uses: actions/checkout@v4+ with:+ submodules: recursive++ - 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: 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_BUILD=$((CURRENT_BUILD + 1))+ NEW_VERSION="${VERSION_NAME}+${NEW_BUILD}"++ 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++ - name: Prepare and validate changelog for Play Store+ run: |+ mkdir -p whatsnew+ CHANGELOG_FILE="scripts/changes.txt"+ OUTPUT_FILE="whatsnew/en-US.txt"++ # 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 later use+ echo "CHANGELOG<<EOF" >> $GITHUB_ENV+ cat "$OUTPUT_FILE" >> $GITHUB_ENV+ echo "EOF" >> $GITHUB_ENV++ - name: Setup keys+ uses: timheuer/base64-to-file@v1+ with:+ fileName: "keystore/ente_photos_key.jks"+ encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}++ - name: Build PlayStore AAB+ run: |+ flutter build appbundle --dart-define=cronetHttpNoPlay=true --release --flavor playstore+ env:+ SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/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: "π Daily release 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)++ **Changes:**+ ${{ env.CHANGELOG }}+ color: 0x00ff00diff --git a/.github/workflows/mobile-internal-release.yml b/.github/workflows/mobile-internal-release.ymlindex 1a689d3785..5da51828ca 100644--- a/.github/workflows/mobile-internal-release.yml+++ b/.github/workflows/mobile-internal-release.yml@@ -1,4 +1,4 @@-name: "Internal release (photos)"+name: "Old Internal release (photos)"on:workflow_dispatch: # Allow manually running the actiondiff --git a/mobile/apps/photos/pubspec.yaml b/mobile/apps/photos/pubspec.yamlindex 245f2f4e48..7c6e5392f9 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.2.0+1203+version: 1.2.0+1205publish_to: noneenvironment: