From a1b9f8e9e65163a74a79419f3ccc4ce3d8cd56fa Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Wed, 25 Sep 2024 16:52:32 +0200 Subject: [PATCH] remove gradle again --- .../.github/workflows/build_app_android.yaml | 16 +++++++++++----- frontend/android/.gitignore | 3 +++ frontend/android/fastlane/Fastfile | 10 +++++++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/frontend/.github/workflows/build_app_android.yaml b/frontend/.github/workflows/build_app_android.yaml index 67c6162..92ae085 100644 --- a/frontend/.github/workflows/build_app_android.yaml +++ b/frontend/.github/workflows/build_app_android.yaml @@ -1,7 +1,7 @@ on: push: - branches: - - main + tags: + - 'v*' jobs: build: @@ -23,6 +23,13 @@ jobs: - name: Setup android SDK uses: android-actions/setup-android@v3 + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version: 3.22.0 + cache: true - name: Infer version number from git tag id: version @@ -30,7 +37,7 @@ jobs: REF_NAME: ${{ github.ref_name }} run: # remove the 'v' prefix from the tag name - echo "VERSION=${REF_NAME//v}" >> $GITHUB_OUTPUT + echo "VERSION_NAME=${REF_NAME//v}" >> $GITHUB_ENV - name: Load secrets from github run: | @@ -46,5 +53,4 @@ jobs: - name: Run fastlane lane run: bundle exec fastlane deploy_testing working-directory: android - env: - VERSION_NAME: ${{ steps.version.VERSION }} + # the environment variable VERSION_NAME is implicitly available diff --git a/frontend/android/.gitignore b/frontend/android/.gitignore index 609e083..7d38cdd 100644 --- a/frontend/android/.gitignore +++ b/frontend/android/.gitignore @@ -1,3 +1,6 @@ +gradlew +gradlew.bat +gradle/ /.gradle /captures/ /local.properties diff --git a/frontend/android/fastlane/Fastfile b/frontend/android/fastlane/Fastfile index f1f9177..5b37b24 100644 --- a/frontend/android/fastlane/Fastfile +++ b/frontend/android/fastlane/Fastfile @@ -7,10 +7,14 @@ platform :android do desc "Deploy a new version as a preview version" lane :deploy_testing do + version_name = ENV["VERSION_NAME"] + sh( - "flutter build appbundle --release", - "--build-name=", - ENV["VERSION_NAME"], + "flutter", + "build", + "appbundle", + "--release", + "--build-name=#{version_name}", ) upload_to_play_store(