From 003034d3433a12a0b26b010dc42df62288cc43e7 Mon Sep 17 00:00:00 2001 From: Brian Lu Date: Thu, 14 Oct 2021 21:20:31 -0500 Subject: [PATCH] initial release CI --- .github/workflows/release-android.yml | 36 +++++++++++++++++++++++++++ pubspec.yaml | 12 --------- 2 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/release-android.yml diff --git a/.github/workflows/release-android.yml b/.github/workflows/release-android.yml new file mode 100644 index 0000000..0e3c6a4 --- /dev/null +++ b/.github/workflows/release-android.yml @@ -0,0 +1,36 @@ +on: + release: + types: [ created ] +name: Android Release +jobs: + generate: + name: Create Android Artifacts + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@master + + - name: Decode Google services config + run: echo "${{ secrets.ANDROID_GOOGLE_SERVICES }}" | base64 --decode > android/app/google-services.json + - name: Decode keystore + run: echo "${{ secrets.ANDROID_UPLOAD_KEYSTORE_JKS }}" | base64 --decode > android/app/upload-keystore.jks + - name: Decode keystore properties + run: echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" | base64 --decode > android/key.properties + + - uses: subosito/flutter-action@v1 + with: + flutter-version: '2.x' + - name: Install dependencies + run: flutter pub get + + - name: Build APK + run: flutter build apk --split-per-abi --release --build-name ${{ github.event.release.tag_name }} --build-number ${{ github.run_id }} + - name: Build AAB + run: flutter build appbundle --release --build-name ${{ github.event.release.tag_name }} --build-number ${{ github.run_id }} + + - name: Upload the artifacts + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: "build/app/outputs/bundle/release/app.aab,build/app/outputs/apk/release/*.apk" \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 874e84d..6691608 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,18 +5,6 @@ description: A new Flutter project. # pub.dev using `pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.3+4 - environment: sdk: ">=2.12.0 <3.0.0"