diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 127baaa..001e76b 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -25,14 +25,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - - name: Clone flutter repository - uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.3' - channel: stable - - run: flutter doctor -v - + submodules: true + + - run: flutter/bin/flutter doctor -v + - name: Setup signing config uses: ./.github/actions/setup-android-signing-config with: @@ -44,7 +41,7 @@ jobs: - name: Get packages and run codegen run: | - bash install_dependencies.sh + bash install_dependencies_with_submodule.sh bash update_changelogs.sh working-directory: scripts diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 311f992..618158e 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -29,7 +29,6 @@ jobs: name: "Deploy to Stores and create GitHub release" runs-on: ubuntu-latest steps: - - name: Extract branch name shell: bash @@ -38,13 +37,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - - name: Clone flutter repository - uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.3' - channel: stable - - run: flutter doctor -v + submodules: true - name: Setup signing config uses: ./.github/actions/setup-android-signing-config @@ -57,7 +51,7 @@ jobs: - name: Get packages and run codegen run: | - bash install_dependencies.sh + bash install_dependencies_with_submodule.sh bash update_changelogs.sh working-directory: scripts diff --git a/.github/workflows/release-deploy-play-store.yml b/.github/workflows/release-deploy-play-store.yml index 2e127be..fc98978 100644 --- a/.github/workflows/release-deploy-play-store.yml +++ b/.github/workflows/release-deploy-play-store.yml @@ -32,13 +32,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - - name: Clone flutter repository - uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.3' - channel: stable - - run: flutter doctor -v + submodules: true - name: Setup signing config uses: ./.github/actions/setup-android-signing-config @@ -51,7 +46,7 @@ jobs: - name: Get packages and run codegen run: | - bash install_dependencies.sh + bash install_dependencies_with_submodule.sh bash update_changelogs.sh working-directory: scripts diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile index b0774e0..88d2de3 100644 --- a/android/fastlane/Fastfile +++ b/android/fastlane/Fastfile @@ -25,7 +25,7 @@ platform :android do |options| lane :publish_in_play_store do |options| release_status = (options[:is_draft] ? "draft" : "completed") track = (options[:track]) - sh "flutter build appbundle -v" + sh "flutter/bin/flutter build appbundle -v" upload_to_play_store( track: track, release_status: release_status, @@ -47,8 +47,8 @@ platform :android do |options| desc "Builds apks and creates a new release on GitHub" lane :github do |options| - sh "flutter build apk --split-per-abi --release" - sh "flutter build apk --release" + sh "flutter/bin/flutter build apk --split-per-abi --release" + sh "flutter/bin/flutter build apk --release" set_github_release( repository_name: "astubenbord/paperless-mobile", api_token: ENV["GH_ACCESS_TOKEN"], diff --git a/scripts/install_dependencies_with_submodule.sh b/scripts/install_dependencies_with_submodule.sh new file mode 100644 index 0000000..617bca5 --- /dev/null +++ b/scripts/install_dependencies_with_submodule.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +__script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +readonly __script_dir + +pushd "$__script_dir/../" + +pushd packages/paperless_api +flutter/bin/flutter packages pub get +flutter/bin/dart run build_runner build --delete-conflicting-outputs +popd + +pushd packages/mock_server +flutter/bin/flutter packages pub get +popd + +flutter/bin/flutter packages pub get +flutter/bin/flutter gen-l10n +flutter/bin/dart run build_runner build --delete-conflicting-outputs + +popd +