-
Notifications
You must be signed in to change notification settings - Fork 22
58 lines (58 loc) · 1.71 KB
/
release.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
name: Release Build
on:
workflow_dispatch:
inputs:
tag:
description: 'Release Tag'
required: true
plugin:
description: 'Plugin to build'
required: true
publish:
description: 'Publish: If want ignore'
required: false
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle.kts') }}
- name: Release Build
run: |
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
bash requirement.sh
dl=1 bash make.sh ${{ github.event.inputs.plugin }}
APK=$(find . -name '*arm64-v8a*.apk')
APK=$(dirname $APK)
echo "APK=$APK" >> $GITHUB_ENV
- uses: actions/upload-artifact@v2
with:
name: APKs
path: ${{ env.APK }}
publish:
name: Publish Release
if: github.event.inputs.publish != 'y'
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Donwload Artifacts
uses: actions/download-artifact@v2
with:
name: APKs
path: artifacts
- name: Release
run: |
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
tar -xvf ghr.tar.gz
mv ghr*linux_amd64/ghr .
mkdir apks
find artifacts -name "*.apk" -exec cp {} apks \;
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks