-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement workflow to test build apk * Implement workflow to test build apk * Fix android api build * Implement upload artifacts * Test artifacts * Implement upload artifacts * Fix keystore ingore
- Loading branch information
1 parent
db6fa91
commit ca5605f
Showing
4 changed files
with
59 additions
and
2 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,57 @@ | ||
name: Build | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
name: Checkout | ||
|
||
- uses: subosito/[email protected] | ||
name: Set up Flutter SDK | ||
with: | ||
channel: 'stable' | ||
cache: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd app | ||
flutter clean | ||
flutter pub get | ||
cd ../data | ||
flutter clean | ||
flutter pub get | ||
cd ../style | ||
flutter clean | ||
flutter pub get | ||
cd .. | ||
- name: Build android APK | ||
run: | | ||
cd app | ||
file='VERSION' | ||
fileData=$(cat $file) | ||
IFS='.' | ||
read -a versionValue <<< "$fileData" | ||
buildNumber=$(( ${versionValue[0]} * 1000000 + ${versionValue[1]} * 10000 + CI_PIPELINE_IID )) | ||
IFS='' | ||
buildName="${versionValue[0]}.${versionValue[1]}.$CI_PIPELINE_IID" | ||
echo "Generating android build $buildName $buildNumber" | ||
flutter build apk --release --build-number=$buildNumber --build-name=$buildName | ||
mv build/app/outputs/apk/release/*.apk . | ||
cd .. | ||
- name: Archive Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cloud-gallery.apk | ||
path: app/*.apk | ||
if-no-files-found: error | ||
|
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 @@ | ||
1.0 |
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
Binary file not shown.