diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e3b2247 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,57 @@ +name: Build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + name: Checkout + + - uses: subosito/flutter-action@v2.12.0 + 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 + diff --git a/app/VERSION b/app/VERSION new file mode 100644 index 0000000..9f8e9b6 --- /dev/null +++ b/app/VERSION @@ -0,0 +1 @@ +1.0 \ No newline at end of file diff --git a/app/android/.gitignore b/app/android/.gitignore index 6f56801..b912b3f 100644 --- a/app/android/.gitignore +++ b/app/android/.gitignore @@ -9,5 +9,4 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties -**/*.keystore -**/*.jks + diff --git a/app/android/app/dev.jks b/app/android/app/dev.jks new file mode 100644 index 0000000..c2a606f Binary files /dev/null and b/app/android/app/dev.jks differ