From 54c8d5851bec454d66017231f1c2076b335eb2df Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Wed, 5 Mar 2025 19:23:53 +0530 Subject: [PATCH] [auth] fix(workflow): remove soon to be deprecated ubuntu-20.04 workflow and switch source to ente-io of flutter_distributor --- .github/workflows/auth-release.yml | 92 +++++++----------------------- 1 file changed, 20 insertions(+), 72 deletions(-) diff --git a/.github/workflows/auth-release.yml b/.github/workflows/auth-release.yml index aa2bdc27d1..337c457cab 100644 --- a/.github/workflows/auth-release.yml +++ b/.github/workflows/auth-release.yml @@ -32,8 +32,8 @@ env: FLUTTER_VERSION: "3.24.3" jobs: - build-ubuntu: - runs-on: ubuntu-20.04 + build-linux-latest: + runs-on: ubuntu-latest defaults: run: @@ -90,22 +90,31 @@ jobs: - name: Install dependencies for desktop build run: | sudo apt-get update -y - sudo apt-get install -y libsecret-1-dev libsodium-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config libsqlite3-dev locate appindicator3-0.1 libappindicator3-dev libffi-dev libtiff5 + 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 libtiff6 xz-utils libarchive-tools libcurl4-openssl-dev sudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu' + - name: Install appimagetool + run: | + wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" + chmod +x appimagetool + mv appimagetool /usr/local/bin/ + - name: Build desktop app run: | flutter config --enable-linux-desktop - # dart pub global activate flutter_distributor - dart pub global activate --source git https://github.com/prateekmedia/flutter_distributor --git-ref develop --git-path packages/flutter_distributor + dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor + # RPM + flutter_distributor package --platform=linux --targets=rpm --skip-clean + mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm + # APPIMAGE + flutter_distributor package --platform=linux --targets=appimage --skip-clean + mv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage + # DEB flutter_distributor package --platform=linux --targets=deb --skip-clean mv dist/**/*-*-linux.deb artifacts/ente-${{ github.ref_name }}-x86_64.deb - env: - LIBSODIUM_USE_PKGCONFIG: 1 - - name: Generate checksums and push to artifacts - run: | - sha256sum artifacts/ente-* > artifacts/sha256sum-apk-deb + - name: Generate checksums + run: sha256sum artifacts/ente-* >> artifacts/sha256sum-rpm-appimage - name: Create a draft GitHub release uses: ncipollo/release-action@v1 @@ -125,67 +134,6 @@ jobs: releaseFiles: auth/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab track: internal - build-fedora-etc: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: auth - - steps: - - name: Checkout code and submodules - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Flutter ${{ env.FLUTTER_VERSION }} - uses: subosito/flutter-action@v2 - with: - channel: "stable" - flutter-version: ${{ env.FLUTTER_VERSION }} - cache: true - - - name: Create artifacts directory - run: mkdir artifacts - - - name: Install dependencies for desktop build - run: | - sudo apt-get update -y - 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 libtiff6 xz-utils libarchive-tools libcurl4-openssl-dev - sudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu' - - - name: Install appimagetool - run: | - wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" - chmod +x appimagetool - mv appimagetool /usr/local/bin/ - - - name: Build desktop app - run: | - flutter config --enable-linux-desktop - # dart pub global activate flutter_distributor - dart pub global activate --source git https://github.com/prateekmedia/flutter_distributor --git-ref develop --git-path packages/flutter_distributor - # Run below command if it is a beta or nightly - if [[ ${{ github.ref }} =~ beta|nightly ]]; then - flutter_distributor package --platform=linux --targets=pacman --skip-clean - mv dist/**/*-*-linux.pacman artifacts/ente-${{ github.ref_name }}-x86_64.pacman - fi - flutter_distributor package --platform=linux --targets=rpm --skip-clean - mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm - flutter_distributor package --platform=linux --targets=appimage --skip-clean - mv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage - - - name: Generate checksums - run: sha256sum artifacts/ente-* >> artifacts/sha256sum-rpm-appimage - - - name: Create a draft GitHub release - uses: ncipollo/release-action@v1 - with: - artifacts: "auth/artifacts/*" - draft: true - allowUpdates: true - updateOnlyUnreleased: true - build-windows: runs-on: windows-latest @@ -213,7 +161,7 @@ jobs: run: | flutter config --enable-windows-desktop # dart pub global activate flutter_distributor - dart pub global activate --source git https://github.com/prateekmedia/flutter_distributor --git-ref develop --git-path packages/flutter_distributor + dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor make innoinstall flutter_distributor package --platform=windows --targets=exe --skip-clean mv dist/**/*-windows-setup.exe artifacts/ente-${{ github.ref_name }}-installer.exe