-
-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (36 loc) · 1.27 KB
/
release_build.yml
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
name: Create Release Build
on:
workflow_dispatch:
inputs:
changelog:
description: 'Changelog'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Build APK with Gradle
run: ./gradlew assembleDebug
- name: extract version code and version name
run: |
echo "VERSION_NAME="$(grep "versionName" app/build.gradle | awk '{print $2}' | sed 's/"//g') >> $GITHUB_ENV
echo "VERSION_CODE="$(grep "versionCode" app/build.gradle | awk '{print $2}') >> $GITHUB_ENV
- name: create tag and release on GitHub
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION_CODE }}
name: ${{ env.VERSION_NAME }}
body: ${{ github.event.inputs.changelog }}
files: |
app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
app/build/outputs/apk/debug/app-armeabi-v7a-debug.apk
app/build/outputs/apk/debug/app-x86-debug.apk
app/build/outputs/apk/debug/app-x86_64-debug.apk
app/build/outputs/apk/debug/app-universal-debug.apk