-
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (63 loc) · 2.09 KB
/
Copy pathmain.yml
File metadata and controls
75 lines (63 loc) · 2.09 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
name: Android App APK Build
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Get version from app.json
id: get_version
run: |
VERSION=$(node -p "require('./app.json').expo.version")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build Android app
run: eas build --platform android --profile production --local --output ${{ github.workspace }}/echo_${{ env.VERSION }}.apk
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: app-release
path: ${{ github.workspace }}/echo_${{ env.VERSION }}.apk
- name: Generate changelog
id: changelog
run: |
PREVIOUS_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -z "$PREVIOUS_TAG" ]; then
CHANGELOG=$(git log --pretty=format:"- %s" --no-merges)
else
CHANGELOG=$(git log ${PREVIOUS_TAG}..HEAD --pretty=format:"- %s" --no-merges)
fi
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ github.workspace }}/echo_${{ env.VERSION }}.apk
tag_name: v${{ env.VERSION }}
body: |
## What's Changed
${{ env.CHANGELOG }}