From be4b4beb0047455e3d3b0dac1baf15ce43e4012a Mon Sep 17 00:00:00 2001 From: "Dr.Blank" <64108942+Dr-Blank@users.noreply.github.com> Date: Fri, 4 Apr 2025 21:35:04 +0530 Subject: [PATCH] Refactor CI workflow and add Linux packaging support; update app title to "Vaani" --- .github/workflows/flutter_release.yaml | 47 +++++++++++++++++++++----- .gitignore | 3 +- distribute_options.yaml | 8 +++++ linux/my_application.cc | 4 +-- linux/packaging/deb/make_config.yaml | 32 ++++++++++++++++++ 5 files changed, 82 insertions(+), 12 deletions(-) create mode 100644 distribute_options.yaml create mode 100644 linux/packaging/deb/make_config.yaml diff --git a/.github/workflows/flutter_release.yaml b/.github/workflows/flutter_release.yaml index ae1ba76..22698fa 100644 --- a/.github/workflows/flutter_release.yaml +++ b/.github/workflows/flutter_release.yaml @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - build: + setup: permissions: # write permission is required to create a github release contents: write @@ -19,13 +19,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - - name: Set Up Java - uses: actions/setup-java@v3.12.0 - with: - distribution: "oracle" - java-version: "17" - - name: Set up Flutter uses: subosito/flutter-action@v2 with: @@ -35,6 +28,20 @@ jobs: - name: Install dependencies run: flutter pub get + build_android: + needs: setup + permissions: + # write permission is required to create a github release + contents: write + runs-on: ubuntu-latest + + steps: + - name: Set Up Java + uses: actions/setup-java@v3.12.0 + with: + distribution: "oracle" + java-version: "17" + # - name: Run tests # run: flutter test @@ -56,6 +63,28 @@ jobs: - name: Build App Bundle run: flutter build appbundle --release + build_linux: + needs: setup + permissions: + # write permission is required to create a github release + contents: write + runs-on: ubuntu-latest + + steps: + - name: setup fastforge + run: | + dart pub global activate fastforge + - name: Build Linux AppImage + run: fastforge package --platform linux --targets deb + + create_release: + needs: [build_android, build_linux] + permissions: + # write permission is required to create a github release + contents: write + runs-on: ubuntu-latest + + steps: - name: version id: version run: | @@ -75,7 +104,7 @@ jobs: - name: Create GitHub Release uses: ncipollo/release-action@v1 with: - artifacts: "build/app/outputs/flutter-apk/*-release*.apk,build/app/outputs/bundle/release/*.aab" + artifacts: "build/app/outputs/flutter-apk/*-release*.apk,build/app/outputs/bundle/release/*.aab,dist/*/*.deb" name: v${{ steps.version.outputs.version }} tag: ${{ github.ref }} body: ${{ steps.generate_release_notes.outputs.body }} diff --git a/.gitignore b/.gitignore index b5a7e29..3eee232 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ migrate_working_dir/ .pub-cache/ .pub/ /build/ +dist/ # Symbolication related app.*.symbols @@ -41,7 +42,7 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release -/android/app/.cxx/Debug +/android/app/.cxx/ # secret keys /secrets diff --git a/distribute_options.yaml b/distribute_options.yaml new file mode 100644 index 0000000..a04cb34 --- /dev/null +++ b/distribute_options.yaml @@ -0,0 +1,8 @@ +output: dist/ +releases: + - name: dev + jobs: + - name: release-dev-linux-deb + package: + platform: linux + target: deb diff --git a/linux/my_application.cc b/linux/my_application.cc index 8a52c8b..ca1287d 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "vaani"); + gtk_header_bar_set_title(header_bar, "Vaani"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "vaani"); + gtk_window_set_title(window, "Vaani"); } gtk_window_set_default_size(window, 1280, 720); diff --git a/linux/packaging/deb/make_config.yaml b/linux/packaging/deb/make_config.yaml new file mode 100644 index 0000000..2db5c2f --- /dev/null +++ b/linux/packaging/deb/make_config.yaml @@ -0,0 +1,32 @@ +display_name: Vaani +package_name: vaani + +maintainer: + name: Dr.Blank + email: drblankdev@gmail.com + +priority: optional + +section: x11 + +installed_size: 75700 + +essential: false + +icon: assets/icon/logo.png + +postuninstall_scripts: + - echo "Sorry to see you go." + +keywords: + - Audiobook + - Audiobook Player + - Audiobookshelf + +generic_name: Audiobook Player + +categories: + - Media + - Utility + +startup_notify: true \ No newline at end of file