Skip to content

Commit 39df1b8

Browse files
committed
Add build workflow
1 parent f4b3c73 commit 39df1b8

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build Android APK
2+
3+
on:
4+
push:
5+
branches: [dev]
6+
pull_request:
7+
branches: [dev]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
SDK_VERSION: 34
16+
NDK_VERSION: 27.0.11718014
17+
MIN_SDK: 29
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: recursive
24+
25+
- name: Setup Java
26+
uses: actions/setup-java@v3
27+
with:
28+
distribution: "temurin"
29+
java-version: "17"
30+
31+
- name: Setup Android SDK
32+
uses: android-actions/setup-android@v3
33+
34+
- name: Install NDK
35+
run: |
36+
sdkmanager "ndk;$NDK_VERSION"
37+
sdkmanager "cmake;3.22.1"
38+
39+
- name: Grant execute permission to Gradle wrapper
40+
run: chmod +x ./gradlew
41+
42+
- name: Build Debug APK
43+
run: ./gradlew assembleDebug
44+
45+
- name: Upload APK artifact
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: testgame-apk
49+
path: app/build/outputs/apk/debug/app-debug.apk

0 commit comments

Comments
 (0)