-
Notifications
You must be signed in to change notification settings - Fork 2.9k
74 lines (61 loc) · 1.93 KB
/
release.yml
File metadata and controls
74 lines (61 loc) · 1.93 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
name: Release APK
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Bump version
id: bump
run: |
NEW_VERSION=$(node scripts/bump-version.js)
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Commit version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add app.json package.json
git commit -m "chore: bump version to v${{ steps.bump.outputs.version }} [skip ci]"
git push
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Expo Prebuild
run: npx expo prebuild --platform android --no-install
- name: Grant Gradle execute permission
run: chmod +x android/gradlew
- name: Build Release APK
env:
SENTRY_DISABLE_AUTO_UPLOAD: 'true'
run: |
cd android
./gradlew assembleRelease --no-daemon
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ steps.bump.outputs.version }}" \
--title "JKVideo v${{ steps.bump.outputs.version }}" \
--generate-notes \
android/app/build/outputs/apk/release/app-release.apk