-
Notifications
You must be signed in to change notification settings - Fork 228
44 lines (35 loc) · 1.16 KB
/
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
44
name: Android Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Set BUILD_TAG
run: echo "BUILD_TAG=.ci" >> $GITHUB_ENV
- name: Decode Keystore
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
run: echo $KEYSTORE | base64 --decode > ./app/ci.ks
- name: Decode Properties
env:
PROPERTIES: ${{ secrets.PROPERTIES }}
run: echo $PROPERTIES | base64 --decode > local.properties
- name: Build with Gradle
run: ./gradlew build
- name: Get current branch name
run: echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@v2
if: ${{ env.BRANCH }} == "3.x"
with:
tag_name: ci${{ github.run_number }}
name: CI-Release-${{ env.BRANCH }}-${{ github.run_number }}
files: ./app/build/outputs/apk/release/com.apkupdater.ci-release.apk
body: ${{ github.event.head_commit.message }}
prerelease: true