-
-
Notifications
You must be signed in to change notification settings - Fork 26
79 lines (68 loc) · 2.61 KB
/
android.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
78
79
name: Android Release Build
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag for the new version'
required: true
default: 'v1.0.0'
release_notes:
description: 'Release notes for the new version'
required: true
default: 'Initial release'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Build Android app in release mode
run: ./gradlew assembleRelease
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-release.apk
path: app/build/outputs/apk/release/app-release.apk
- name: Download vectras-vm-arm64-v8a.tar.gz
run: wget -O vectras-vm-arm64-v8a.tar.gz https://github.com/xoureldeen/Vectras-VM-Android/releases/download/v2.9.2/vectras-vm-arm64-v8a.tar.gz
- name: Download vectras-vm-x86_64.tar.gz
run: wget -O vectras-vm-x86_64.tar.gz https://github.com/xoureldeen/Vectras-VM-Android/releases/download/v2.9.2/vectras-vm-x86_64.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Create a release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.event.inputs.release_tag }}
release_name: Release ${{ github.event.inputs.release_tag }}
body: ${{ github.event.inputs.release_notes }}
draft: false
prerelease: false
- name: Upload APK to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/release/app-release.apk
asset_name: app-release.apk
asset_content_type: application/vnd.android.package-archive
- name: Upload vectras-vm-arm64-v8a.tar.gz to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: vectras-vm-arm64-v8a.tar.gz
asset_name: vectras-vm-arm64-v8a.tar.gz
asset_content_type: application/gzip
- name: Upload vectras-vm-x86_64.tar.gz to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: vectras-vm-x86_64.tar.gz
asset_name: vectras-vm-x86_64.tar.gz
asset_content_type: application/gzip