Skip to content

Commit

Permalink
[gh] refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dreautall committed Feb 24, 2024
1 parent 7a038dd commit 4cbccf9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 36 deletions.
26 changes: 26 additions & 0 deletions .github/actions/setup_env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Setup Flutter environment
description: Setup Flutter environment
runs:
using: "composite"
steps:
# Setup the Java environment.
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{vars.JAVA_VERSION}}
cache: 'gradle'

# Setup the Flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: ${{vars.FLUTTER_CHANNEL}}
cache: true

# No dart analytics.
- run: dart --disable-analytics

# No flutter analytics.
- run: flutter config --disable-analytics

# Get flutter dependencies.
- run: flutter pub get
6 changes: 3 additions & 3 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v4

# Call setup_env workflow to setup workspace
- uses: ./.github/workflows/setup_env.yml
# Call setup_env action to setup workspace
- uses: ./.github/actions/setup_env

# Check for any formatting issues in the code.
- run: dart format --set-exit-if-changed .
Expand All @@ -20,4 +20,4 @@ jobs:
- run: dart analyze .

# Run widget tests for our flutter project.
# - run: flutter test
# - run: flutter test
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v4

# Call setup_env workflow to setup workspace
- uses: ./.github/workflows/setup_env.yml
# Call setup_env action to setup workspace
- uses: ./.github/actions/setup_env

# Generate keystore
- uses: timheuer/[email protected]
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/setup_env.yml

This file was deleted.

0 comments on commit 4cbccf9

Please sign in to comment.