-
-
Notifications
You must be signed in to change notification settings - Fork 79
79 lines (64 loc) · 2.4 KB
/
release-huawei-appgallery.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Huawei AppGallery
on:
release:
types: [published]
workflow_dispatch:
jobs:
appgallery:
name: Release (foss)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.0.5
- name: Flutter version
run: flutter --version
- name: Cache pub dependencies
uses: actions/cache@v2
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Download pub dependencies
run: flutter pub get
- name: Download Android keystore
id: android_keystore
uses: timheuer/[email protected]
with:
fileName: key.jks
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
- name: Build Android App Bundle
run: flutter build appbundle --flavor foss
- name: Cache bundle dependencies
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Download bundle dependencies
run: |
gem install bundler:2.0.2
bundle config path vendor/bundle
bundle install
- name: Release to Huawei AppGallery
env:
HUAWEI_APPGALLERY_CONNECT_APP_ID: ${{ secrets.APPGALLERY_APP_ID }}
HUAWEI_APPGALLERY_CONNECT_CLIENT_ID: ${{ secrets.APPGALLERY_CLIENT_ID }}
HUAWEI_APPGALLERY_CONNECT_CLIENT_SECRET: ${{ secrets.APPGALLERY_CLIENT_SECRET }}
run: |
bundle exec fastlane run huawei_appgallery_connect \
apk_path:build/app/outputs/bundle/fossRelease/app-foss-release.aab \
is_aab:true