-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (53 loc) · 2.11 KB
/
android-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Android Release
on:
push:
branches:
- 'master'
tags:
- '*'
jobs:
assembleRelease:
runs-on: ubuntu-22.04
container:
image: ghcr.io/cirruslabs/flutter:3.13.9
steps:
- uses: actions/checkout@v2
- name: Restore Release Keystore from secrets
run: |
echo "${{ secrets.ANDROID_RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" --batch release.keystore.asc > android/app/release.keystore
- name: Install dependencies
run: flutter pub get
- name: Create Appbundle
run: flutter build appbundle --release
env:
ANDROID_RELEASE_ALIAS: ${{ secrets.ANDROID_RELEASE_KEYSTORE_ALIAS }}
ANDROID_RELEASE_ALIAS_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEYSTORE_ALIAS_PASSWORD }}
ANDROID_RELEASE_STORE_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEYSTORE_STORE_PASSWORD }}
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}
- uses: actions/upload-artifact@v2
with:
name: appbundle
path: build/app/outputs/bundle/release/app-release.aab
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/app/outputs/apk/release/app-release.apk
build/app/outputs/bundle/release/app-release.aab
- name: Load google_play_service_account.json from secrets
run: |
echo "${{ secrets.SERVICE_ACCOUNT_JSON_BASE64 }}" | base64 --decode > google_play_service_account.json
- name: Upload to GooglePlay
uses: r0adkll/[email protected]
if: startsWith(github.ref, 'refs/tags/')
# workaround, see https://github.com/r0adkll/upload-google-play/issues/129#issuecomment-1325892395
env:
OPENSSL_CONF: /dev/null
with:
releaseFiles: build/app/outputs/bundle/release/app-release.aab
serviceAccountJson: google_play_service_account.json
packageName: com.munichways.app
track: alpha
status: completed