-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.24 KB
/
android.yml
File metadata and controls
45 lines (43 loc) · 1.24 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
name: Build & Publish Release APK
permissions:
contents: write
id-token: write
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Extract Latest Changelog
run: |
awk '/^#+ \[?[0-9]/ { if (p) exit; p=1 } p' CHANGELOG.md > latest-release.md
- name: Running expo prebuild
run: npx expo prebuild --platform android --no-install
- name: setup jdk
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Make Gradle executable
run: chmod +x ./gradlew
working-directory: android
- name: Build Release APK
run: ./gradlew assembleRelease
working-directory: android
- name: Release to GitHub
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
files: android/app/build/outputs/apk/release/app-release.apk
body_path: latest-release.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}