-
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 1a63f0f
Showing
5 changed files
with
138 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "iOS Workflow" | ||
|
||
inputs: | ||
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: | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
cache: true | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: flutter test | ||
|
||
- name: Build iOS IPA | ||
shell: bash | ||
env: | ||
VERSION_NAME: ${{inputs.VERSION_NAME}} | ||
VERSION_CODE: ${{inputs.VERSION_CODE}} | ||
run: | | ||
flutter build ipa --no-codesign --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
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