-
Notifications
You must be signed in to change notification settings - Fork 79
83 lines (71 loc) · 3.32 KB
/
build-debug-key.yml
File metadata and controls
83 lines (71 loc) · 3.32 KB
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
80
81
82
83
name: Build and Release Debug
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to create release for (e.g., v1.0.0)'
required: true
default: 'v1.0.0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Get dependencies
run: flutter pub get
- name: Build universal APK
run: flutter build apk --release
- name: Build split APKs
run: flutter build apk --split-per-abi --release
- name: Rename APKs
run: |
mkdir -p release
cp build/app/outputs/flutter-apk/app-release.apk release/proxycloud-universal.apk
cp build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk release/proxycloud-armeabi-v7a.apk
cp build/app/outputs/flutter-apk/app-arm64-v8a-release.apk release/proxycloud-arm64-v8a.apk
cp build/app/outputs/flutter-apk/app-x86_64-release.apk release/proxycloud-x86_64.apk
shell: bash
- name: Get tag name
id: get_tag
run: |
if [[ $GITHUB_EVENT_NAME == 'workflow_dispatch' ]]; then
echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
else
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
shell: bash
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
name: Release ${{ env.TAG_NAME }}
draft: false
prerelease: false
files: |
release/proxycloud-universal.apk
release/proxycloud-armeabi-v7a.apk
release/proxycloud-arm64-v8a.apk
release/proxycloud-x86_64.apk
body: |
## Installation
### Download
| Architecture | Download Link |
|-------------|---------------|
| Universal | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-universal.apk"><img src="https://img.shields.io/badge/Android-Universal-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android Universal"></a> |
| armeabi-v7a | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-armeabi-v7a.apk"><img src="https://img.shields.io/badge/Android-armeabi--v7a-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android armeabi-v7a"></a> |
| arm64-v8a | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-arm64-v8a.apk"><img src="https://img.shields.io/badge/Android-arm64--v8a-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android arm64-v8a"></a> |
| x86_64 | <a href="https://github.com/code3-dev/ProxyCloud/releases/download/${{ env.TAG_NAME }}/proxycloud-x86_64.apk"><img src="https://img.shields.io/badge/Android-x86_64-3DDC84?style=for-the-badge&logo=android&logoColor=white" alt="Android x86_64"></a> |