-
Notifications
You must be signed in to change notification settings - Fork 228
44 lines (36 loc) · 1.17 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: 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
env:
BUILD_TAG: ".ci"
BUILD_NUMBER: ${{ github.run_number }}
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: 0.0.${{ github.run_number }}-ci
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