forked from kairusds-testing/osu-droid-old
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.67 KB
/
master.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Master Branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: 11
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create debug build
uses: gradle/gradle-build-action@v1
with:
distributions-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
arguments: build
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "::set-output name=apk_path::$(find build/outputs/apk/debug/*.apk)"
- name: Get apk info
id: apk-info
uses: hkusu/apk-info-action@v1
with:
apk-path: ${{ steps.vars.outputs.apk_path }}
- name: Output apk version code
run: |
export VERSION_CODE="${{ steps.apk-info.outputs.version-code }}"
echo "{\"version_code\": $VERSION_CODE}" > info.json
unset VERSION_CODE
- name: Upload binaries to a release
uses: softprops/action-gh-release@v1
with:
body: ${{ github.event.head_commit.message }}
files: |
info.json
${{ steps.vars.outputs.apk_path }}
tag_name: ${{ steps.vars.outputs.sha_short }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: osu-droid-debug
path: ${{ steps.vars.outputs.apk_path }}