-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (76 loc) · 2.1 KB
/
build-TL-v1.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
71
72
73
74
75
76
77
name: Minimal Android CI Workflow
on:
pull_request:
branches: [ master ]
types: [ closed ]
concurrency:
group: pico4fun_build_concurrency
cancel-in-progress: true
jobs:
test:
if: github.event.pull_request.merged == true
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up AWS Coretto 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
architecture: x64
- name: Run Tests
run: bash ./gradlew test --stacktrace
apk:
name: Generate APK
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up AWS Coretto 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
architecture: x64
- name: Build APK
run: bash ./gradlew assembleRelease
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: apk
path: app/build/outputs/apk/release/app-release.apk
release:
permissions: write-all
name: Release APK
needs: apk
runs-on: ubuntu-latest
steps:
- name: Download APK from build
uses: actions/download-artifact@v1
with:
name: apk
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TNAME }}${{ env.AARCH }}
release_name: ${{ env.RNAME }}
- name: Upload Release APK
id: upload_release_asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: apk/app-release.apk
asset_name: ${{ env.TNAME }}${{ env.AARCH }}.apk
asset_content_type: application/gzip
env:
RNAME: Pico 4 Fun
TNAME: pico4fun_1.0.0_r1_
AARCH: arm64_v8a