-
Notifications
You must be signed in to change notification settings - Fork 82
70 lines (70 loc) · 2.11 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
59
60
61
62
63
64
65
66
67
68
69
70
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@v4
- name: Gradle cache
uses: actions/cache@v3
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@v3
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@v4
- name: Donwload Artifacts
uses: actions/download-artifact@v3
with:
name: APKs
path: artifacts
- name: Find APKs
run: |
mkdir -p apks/
find artifacts/ -name "*.apk" -exec cp {} apks/ \;
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
file: ./apks/*
file_glob: true
prerelease: true
# - name: Release
# run: |
# wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.16.0/ghr_v0.16.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 -prerelease -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks