Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: use flutter-version-file argument to subosito/flutter-action #1216

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
git fetch origin develop
git pull origin master
echo "DEVELOP_HASH=$(git rev-parse origin/develop)" >> $GITHUB_ENV
echo "MASTER_HASH=$(git rev-parse origin/master^2)" >> $GITHUB_ENV
echo "MASTER_HASH=$(git rev-parse origin/master^2)" >> $GITHUB_ENV

- name: Get latest version (develop)
if: github.ref != 'refs/heads/master'
Expand All @@ -48,15 +48,15 @@ jobs:
google_service_account_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}
package_name: ${{ secrets.ANDROID_PACKAGE_NAME }}
track: "beta"

- name: Get latest production version
uses: LuisDuarte1/[email protected]
id: latest-production-version
with:
google_service_account_json: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }}
package_name: ${{ secrets.ANDROID_PACKAGE_NAME }}
track: "production"

- name: Bump beta version
uses: LuisDuarte1/[email protected]
if: github.ref != 'refs/heads/master'
Expand All @@ -66,7 +66,7 @@ jobs:
production_version: ${{ steps.latest-production-version.outputs.latest_version_name }}
staging_version: ${{ steps.latest-beta-version.outputs.latest_version_name }}
bump_type: prerelease

- name: Bump prod version (from develop)
uses: LuisDuarte1/[email protected]
if: github.ref == 'refs/heads/master' && env.MASTER_HASH == env.DEVELOP_HASH
Expand All @@ -84,7 +84,7 @@ jobs:
current_environment: production
production_version: ${{ steps.latest-production-version.outputs.latest_version_name }}
bump_type: patch

- name: Combine output and write new version into file
run: |
export NEW_VERSION_NAME=${{
Expand All @@ -106,17 +106,11 @@ jobs:
java-version: ${{env.JAVA_VERSION}}
distribution: "zulu"

- uses: mikefarah/yq@master
name: Get Flutter version
id: get_flutter_version
with:
cmd: yq '.environment.flutter' uni/pubspec.yaml

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ steps.get_flutter_version.outputs.result }}
flutter-version-file: uni/pubspec.yaml
cache: true

- name: Download Android keystore
Expand All @@ -133,7 +127,7 @@ jobs:

- name: Create .env file
run: echo "${{vars.UNI_ENV_FILE}}" > ./assets/env/.env

- name: Build Android App Bundle
run: |
flutter pub get
Expand Down
24 changes: 3 additions & 21 deletions .github/workflows/format_lint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,11 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

- uses: mikefarah/yq@master
name: Get Flutter version
id: get_flutter_version
with:
cmd: yq '.environment.flutter' uni/pubspec.yaml

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ steps.get_flutter_version.outputs.result }}
flutter-version-file: uni/pubspec.yaml
cache: true

- run: dart format $(find . -type f -name "*.dart" -a -not -name "*.g.dart" -a -not -name "*.mocks.dart") --set-exit-if-changed
Expand All @@ -48,17 +42,11 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
distribution: zulu

- uses: mikefarah/yq@master
name: Get Flutter version
id: get_flutter_version
with:
cmd: yq '.environment.flutter' uni/pubspec.yaml

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ steps.get_flutter_version.outputs.result }}
flutter-version-file: uni/pubspec.yaml
cache: true

- run: flutter analyze .
Expand All @@ -77,17 +65,11 @@ jobs:
java-version: ${{ env.JAVA_VERSION }}
distribution: zulu

- uses: mikefarah/yq@master
name: Get Flutter version
id: get_flutter_version
with:
cmd: yq '.environment.flutter' uni/pubspec.yaml

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ steps.get_flutter_version.outputs.result }}
flutter-version-file: uni/pubspec.yaml
cache: true

- name: Test with coverage
Expand Down
Loading