Skip to content

armgit / ente

Public Imported from GitHub
0

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

Split Auth Android and Linux builds

Manav Rathidb5317b459d6
diff --git a/.github/workflows/auth-build.yml b/.github/workflows/auth-build.yml
index 8eab83d21f..39367a2cbc 100644
--- a/.github/workflows/auth-build.yml
+++ b/.github/workflows/auth-build.yml
@@ -82,7 +82,7 @@ jobs:
echo "artifact_stem=ente-${release_tag%-rc}" >> "${GITHUB_OUTPUT}"
node .github/scripts/release-notes.mjs mobile/apps/auth/changes "${release_tag}" >> "${GITHUB_OUTPUT}"
- build-android-linux:
+ build-android:
needs: build-metadata
if: needs.build-metadata.outputs.should_build == 'true'
runs-on: ubuntu-22.04
@@ -166,7 +166,83 @@ jobs:
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_AUTH }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_AUTH }}
- - name: Install dependencies for desktop build
+ - name: Generate checksums
+ run: sha256sum artifacts/ente-auth-*.apk > artifacts/sha256sum-apk
+
+ - name: Upload checksum snippet
+ uses: actions/upload-artifact@v4
+ with:
+ name: auth-sha256sum-android
+ path: mobile/apps/auth/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/auth/artifacts/ente-auth-*.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.auth
+ releaseFiles: mobile/apps/auth/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
+ track: internal
+ whatsNewDirectory: mobile/apps/auth/whatsnew
+ mappingFile: mobile/apps/auth/build/app/outputs/mapping/playstoreRelease/mapping.txt
+
+ build-linux:
+ needs: build-metadata
+ if: needs.build-metadata.outputs.should_build == 'true'
+ runs-on: ubuntu-22.04
+ 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/auth
+
+ steps:
+ - name: Checkout code and submodules
+ uses: actions/checkout@v6
+ with:
+ ref: ${{ needs.build-metadata.outputs.commit_sha }}
+ submodules: recursive
+
+ - 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: Generate strings localizations
+ run: flutter gen-l10n
+ working-directory: mobile/packages/strings
+
+ - name: Set build version
+ run: node ../../../.github/scripts/auth-version.mjs set-build "${RELEASE_VERSION}" "${BUILD_NUMBER}"
+
+ - name: Resolve dependencies with lockfile enforcement
+ run: flutter pub get --enforce-lockfile
+
+ - name: Create artifacts directory
+ run: mkdir artifacts
+
+ - name: Install dependencies for Linux build
run: |
sudo apt-get update
sudo apt-get install -y libsecret-1-dev libsodium-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools libcurl4-openssl-dev
@@ -181,7 +257,7 @@ jobs:
chmod +x appimagetool
mv appimagetool /usr/local/bin/
- - name: Build desktop app
+ - name: Build Linux app
run: |
flutter config --enable-linux-desktop
flutter build linux --release
@@ -194,40 +270,26 @@ jobs:
mv dist/**/*-*-linux.deb "artifacts/${ARTIFACT_STEM}-x86_64.deb"
- name: Generate checksums
- run: |
- sha256sum artifacts/ente-auth-*.apk > artifacts/sha256sum-apk
- sha256sum artifacts/ente-auth-*.deb artifacts/ente-auth-*.rpm artifacts/ente-auth-*.AppImage > artifacts/sha256sum-linux
+ run: sha256sum artifacts/ente-auth-*.deb artifacts/ente-auth-*.rpm artifacts/ente-auth-*.AppImage > artifacts/sha256sum-linux
- - name: Upload checksum snippets
+ - name: Upload checksum snippet
uses: actions/upload-artifact@v4
with:
- name: auth-sha256sum-android-linux
- path: |
- mobile/apps/auth/artifacts/sha256sum-apk
- mobile/apps/auth/artifacts/sha256sum-linux
+ name: auth-sha256sum-linux
+ path: mobile/apps/auth/artifacts/sha256sum-linux
- - name: Upload Android and Linux artifacts to GitHub release
+ - name: Upload Linux artifacts 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/auth/artifacts/ente-auth-*.apk,mobile/apps/auth/artifacts/ente-auth-*.deb,mobile/apps/auth/artifacts/ente-auth-*.rpm,mobile/apps/auth/artifacts/ente-auth-*.AppImage"
+ artifacts: "mobile/apps/auth/artifacts/ente-auth-*.deb,mobile/apps/auth/artifacts/ente-auth-*.rpm,mobile/apps/auth/artifacts/ente-auth-*.AppImage"
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.auth
- releaseFiles: mobile/apps/auth/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
- track: internal
- whatsNewDirectory: mobile/apps/auth/whatsnew
- mappingFile: mobile/apps/auth/build/app/outputs/mapping/playstoreRelease/mapping.txt
-
build-windows:
needs: build-metadata
if: needs.build-metadata.outputs.should_build == 'true'
@@ -564,7 +626,7 @@ jobs:
-authenticationKeyIssuerID "${ASC_ISSUER_ID}"
finish-build:
- needs: [build-metadata, build-android-linux, build-windows, build-macos, build-ios]
+ 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