Skip to content

Commit

Permalink
initial release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenCappuccino committed Oct 15, 2021
1 parent df0c536 commit 003034d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release-android.yml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 0 additions & 12 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 003034d

Please sign in to comment.