-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use general workflows to share steps
- Loading branch information
1 parent
2011bb5
commit df6dd0e
Showing
3 changed files
with
97 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Android Workflow" | ||
|
||
inputs: | ||
STORE_PASS: | ||
description: 'Store Password' | ||
required: false | ||
default: '' | ||
ALIAS: | ||
description: 'Certificate Alias' | ||
required: false | ||
default: '' | ||
KEY_PASS: | ||
description: 'Key Password' | ||
required: false | ||
default: '' | ||
VERSION_NAME: | ||
description: 'Version Name to be used for build' | ||
required: false | ||
default: '1.0.0' | ||
VERSION_CODE: | ||
description: 'Version Code to be used for build' | ||
required: true | ||
default: '1' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
cache: true | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: flutter test | ||
|
||
- name: Build Android APK/AAB | ||
shell: bash | ||
env: | ||
STORE_PASS: ${{ inputs.STORE_PASS }} | ||
ALIAS: ${{ inputs.ALIAS }} | ||
KEY_PASS: ${{ inputs.KEY_PASS }} | ||
VERSION_NAME: ${{inputs.VERSION_NAME}} | ||
VERSION_CODE: ${{inputs.VERSION_CODE}} | ||
run: | | ||
flutter build apk --build-name $VERSION_NAME --build-number $VERSION_CODE | ||
flutter build appbundle --build-name $VERSION_NAME --build-number $VERSION_CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Common Workflow" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
cache: true | ||
|
||
- name: Fetch Flutter Dependencies | ||
shell: bash | ||
run: flutter pub get | ||
|
||
- name: Validate Code Format | ||
shell: bash | ||
run: dart format --output=none --set-exit-if-changed . | ||
|
||
- name: Analyze Code | ||
shell: bash | ||
run: flutter analyze |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters