-
Notifications
You must be signed in to change notification settings - Fork 5
65 lines (54 loc) · 1.64 KB
/
build.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
name: Build & Publish Release APK
on:
push:
branches:
- stable
tags:
- "*"
workflow_dispatch:
jobs:
Gradle:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "adopt"
java-version: "21"
cache: "gradle"
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Build Expo
run: yarn build:android
- name: Prepare Keystore
shell: bash
run: echo "${{ secrets.BASE_64_SIGNING_KEY }}" | base64 -d > $GITHUB_WORKSPACE/signing-key.jks
- name: Build Signed APK
run: |
cd android
chmod +x ./gradlew
./gradlew build
./gradlew assembleRelease \
-Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks \
-Pandroid.injected.signing.store.password=${{ secrets.STORE_PASSWORD }} \
-Pandroid.injected.signing.key.alias=key0 \
-Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }}
- name: Prepare Tag
id: tag
run: echo "version=$(date +'v%y.%m.%d.%H%M%S')" >> $GITHUB_OUTPUT
- name: Release APK
uses: ncipollo/release-action@v1
with:
artifacts: app/build/outputs/apk/release/*.apk
tag: ${{ steps.tag.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}