-
-
Notifications
You must be signed in to change notification settings - Fork 58
78 lines (75 loc) · 2.42 KB
/
build_mobile_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
name: Build mobile android
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to build (e.g., v1.0.0)'
required: true
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Validate tag
run: |
git fetch --all --tags
if ! git tag -l | grep -q "^${{ github.event.inputs.tag }}$"; then
echo "Error: Tag ${{ github.event.inputs.tag }} does not exist."
exit 1
fi
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
id: install_code
run: bun install
- name: Build
id: build_code
run: bun mobile
- name: Sync
id: sync_code
run: bun x cap sync android
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '17'
- name: Decode Keystore File
uses: timheuer/base64-to-file@v1
id: android_keystore
with:
fileName: android_keystore.keystore
encodedString: ${{ secrets.ANDROID_KEYSTORE_FILE }}
- name: Decode Google Play Confi File
uses: timheuer/base64-to-file@v1
id: service_account_json_file
with:
fileName: serviceAccount.json
encodedString: ${{ secrets.PLAY_CONFIG_JSON }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- uses: maierj/[email protected]
env:
KEYSTORE_PATH: ${{ steps.android_keystore.outputs.filePath }}
ANDROID_JSON_KEY_FILE: ${{ steps.service_account_json_file.outputs.filePath }}
DEVELOPER_PACKAGE_NAME: ${{ secrets.DEVELOPER_PACKAGE_NAME }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
with:
lane: android beta
- name: Upload release bundle
uses: actions/upload-artifact@v4
with:
name: android-release
path: ./android/app/build/outputs/bundle/release/app-release.aab
retention-days: 10