-
-
Notifications
You must be signed in to change notification settings - Fork 93
99 lines (78 loc) · 2.66 KB
/
build-apk.yml
File metadata and controls
99 lines (78 loc) · 2.66 KB
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 APK
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "21"
- name: Install pnpm
run: corepack enable && corepack prepare pnpm@latest --activate
- name: Install dependencies
run: pnpm install
- name: Build Vue frontend
run: pnpm run build:frontend
- name: Build CLI server
run: pnpm run build:cli
- name: Bundle server into APK assets
run: bash android/scripts/build-server-bundle.sh
- name: Download Termux bootstrap
run: bash android/scripts/download-bootstrap.sh
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build debug APK
working-directory: android
run: ./gradlew assembleDebug
- name: Rename APK
run: cp android/app/build/outputs/apk/debug/app-debug.apk android/app/build/outputs/apk/debug/anyclaw.apk
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: anyclaw
path: android/app/build/outputs/apk/debug/anyclaw.apk
- name: Generate changelog
if: github.ref_type == 'branch'
id: changelog
run: |
PREV_TAG=$(git tag --sort=-v:refname | head -1)
if [ -n "$PREV_TAG" ]; then
CHANGES=$(git log "$PREV_TAG"..HEAD --pretty=format:"- %s" --reverse)
else
CHANGES=$(git log --pretty=format:"- %s" --reverse -20)
fi
{
echo "notes<<CHANGELOG_EOF"
echo "$CHANGES"
echo "CHANGELOG_EOF"
} >> "$GITHUB_OUTPUT"
- name: Create Release
if: github.ref_type == 'branch'
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.run_number }}
name: "AnyClaw v${{ github.run_number }} (${{ github.ref_name }})"
body: |
🦞 **AnyClaw** — OpenClaw + Codex on Android
📱 Install the APK on any ARM64 Android 7.0+ device. No root required.
### Changes
${{ steps.changelog.outputs.notes }}
---
Branch: ${{ github.ref_name }}
Built from commit ${{ github.sha }}
files: android/app/build/outputs/apk/debug/anyclaw.apk
draft: false
prerelease: false