-
Notifications
You must be signed in to change notification settings - Fork 55
65 lines (54 loc) · 1.53 KB
/
android_release.yml
File metadata and controls
65 lines (54 loc) · 1.53 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
name: Android Release CI
on:
push:
tags:
- '**'
env:
FILE_REPO: ${{ secrets.FILE_REPO }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
if: ${{ env.FILE_REPO != '' }}
uses: actions/checkout@v3
with:
submodules: true
- name: Prepare Files
if: ${{ env.FILE_REPO != '' }}
uses: actions/checkout@v3
with:
repository: ${{ env.FILE_REPO }}
token: ${{ secrets.GH_PAT }}
path: secrets
- name: Release Files
if: ${{ env.FILE_REPO != '' }}
run: |
cd secrets
cp key.jks ..
cp secret.gradle ..
cp notice.iml ../app/src/main/res/raw/
- name: Set up JDK 11
if: ${{ env.FILE_REPO != '' }}
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Grant execute permission for gradlew
if: ${{ env.FILE_REPO != '' }}
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew assembleGithub
- name: Find Apk File Name
if: ${{ env.FILE_REPO != '' }}
run: |
cd app/build/outputs/apk/Github/release
echo "file_name=$(ls *.apk)" >> $GITHUB_ENV
- name: Upload Release
if: ${{ env.FILE_REPO != '' }}
uses: softprops/action-gh-release@v1
with:
draft: true
tag_name: ${{ github.ref_name }}
files: 'app/build/outputs/apk/Github/release/${{ env.file_name }}'
retention-days: 10