-
-
Notifications
You must be signed in to change notification settings - Fork 10
74 lines (60 loc) · 2.45 KB
/
test.yaml
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
# Github action marketplace: https://github.com/marketplace?type=actions
name: Test
on:
push:
branches: [ feature/migrate_and_refactor ]
jobs:
build_android:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Print environment variables
run: env
- name: Print architecture
run: uname -m
- name: Get current version
id: increment-version
run: echo "::set-output name=version::$((${{ vars.BASE_VERSION_CODE }} + $GITHUB_RUN_NUMBER))"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.0'
channel: 'stable'
- run: flutter --version
shell: bash
- name: Install all dependencies
run: flutter pub get
# - name: Run test
# run: flutter test
- name: Restore release keystore
run: |
echo "${{ secrets.RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.RELEASE_KEYSTORE_PASSPAHSE }}" --batch release.keystore.asc > ./android/app/vocadb-release-key.keystore
ls -l ./android/app
- name: Create key.properties
run: |
echo "storePassword=${{ secrets.STORE_PASSWORD }}" > ./android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> ./android/key.properties
echo "keyAlias=vocadb" >> ./android/key.properties
echo "storeFile=./vocadb-release-key.keystore" >> ./android/key.properties
- name: Build appbundle
run: flutter build appbundle --build-number=${{ steps.increment-version.outputs.version }} --no-tree-shake-icons
- name: Download google-play-service-account.json
run: |
echo "${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}" > google-play-service-account.asc
gpg -d --passphrase "${{ secrets.RELEASE_KEYSTORE_PASSPAHSE }}" --batch google-play-service-account.asc > ./android/google-play-service-account.json
ls -l ./android
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
working-directory: android
- uses: maierj/[email protected]
with:
subdirectory: 'android'
lane: 'internal'
options: '{ "version_code": ${{ steps.increment-version.outputs.version }} }'