-
Notifications
You must be signed in to change notification settings - Fork 17
99 lines (79 loc) · 2.82 KB
/
mobile-build-android.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build Android App
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 18
- uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "17"
- name: Fix package.json
run: yarn remove @lottiefiles/react-lottie-player
- name: Install node modules
run: yarn install
- name: Bump android versionNumber
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: make bump-app-build-number
- name: Download service account from env
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: echo ${{ secrets.GOOGLE_SERVICES_JSON }} | base64 --decode > ./service-account-android-submit.json
- name: Fix gitignore
run: npx tsx ./packages/scripts/app-build/fixGitignore.ts
- name: Restore wesh framework from cache if possible
uses: actions/cache@v4
with:
path: weshd/android/libs/WeshFramework.aar
key: cache_wesh-framework_android_go1.19_linux_${{ hashFiles('weshd/**/*.go', 'weshd/go.mod', 'weshd/go.sum') }}
- name: Build android weshframework
run: make check-android-weshframework
- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Build android
run: eas build --local --non-interactive --platform=android
- name: Update aab File path
run: |
AAB_FILE=$(find ./ -name 'build-*.aab' -type f)
if [ -z "$AAB_FILE" ]; then
echo "Error: apk file not found."
exit 1
fi
echo "AAB_FILE=$AAB_FILE" >> $GITHUB_ENV
- name: EAS Submit Android aab
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: eas submit --platform=android --path=${{ env.AAB_FILE }} --profile=production
- name: Upload aab
uses: actions/upload-artifact@v3
with:
name: teritori-${{ github.sha }}.aab
path: ${{ env.AAB_FILE }}
if-no-files-found: error