-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (55 loc) · 1.91 KB
/
release.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
name: Dist / Android / Release
on:
push:
# Every branch that starts with "release"
tags:
- release-v*
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: self-hosted
# When upgrading: also upgrade dev.yaml, release.yaml, and test.yaml
container: ghcr.io/cirruslabs/flutter:3.19.6
steps:
- uses: actions/checkout@v2
- name: Run unit tests
run: |
flutter pub get
dart format --line-length 120 --set-exit-if-changed .
flutter analyze .
flutter test
distribute:
runs-on: self-hosted
needs: test
# When upgrading: also upgrade dev.yaml, release.yaml, and test.yaml
container: ghcr.io/cirruslabs/flutter:3.19.6
steps:
- uses: actions/checkout@v3
with:
# Fetch all tags to get the latest version
fetch-tags: true
- name: Prepare secret files
run: |
echo "$GRADLE_PROPERTIES_BASE64" | base64 --decode > android/gradle.properties
echo "$API_KEY_BASE64" | base64 --decode > android/fastlane/api-key.json
echo "$KEYSTORE_BASE64" | base64 --decode > android/fastlane/keystore.jks
echo "$KEY_PROPERTIES_BASE64" | base64 --decode > android/key.properties
env:
GRADLE_PROPERTIES_BASE64: ${{ secrets.GRADLE_PROPERTIES_BASE64 }}
API_KEY_BASE64: ${{ secrets.API_KEY_BASE64 }}
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEY_PROPERTIES_BASE64: ${{ secrets.KEY_PROPERTIES_BASE64 }}
- name: Build the Android app bundle
run: |
./get_tag.sh
flutter pub get
flutter build appbundle
- name: Install Fastlane
run: |
gem install fastlane
- name: Distribute via Fastlane to Production Track
run: |
cd android
fastlane release