-
Notifications
You must be signed in to change notification settings - Fork 10
138 lines (119 loc) · 4.28 KB
/
build-release.yml
File metadata and controls
138 lines (119 loc) · 4.28 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
artifact_name: android-bloatware-remover.exe
asset_name: android-bloatware-remover-windows.exe
- os: ubuntu-latest
artifact_name: android-bloatware-remover
asset_name: android-bloatware-remover-linux
- os: macos-latest
artifact_name: android-bloatware-remover
asset_name: android-bloatware-remover-macos
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Create PyInstaller spec file
run: python build_spec.py
- name: Build with PyInstaller
run: |
echo "Building with PyInstaller..."
echo "Current directory: $(pwd)"
echo "Files in current directory:"
ls -la
echo "Building executable..."
pyinstaller android-bloatware-remover.spec --clean --log-level INFO
echo "Build completed. Checking dist directory:"
ls -la dist/ || echo "dist directory not found"
- name: Test executable (Windows)
if: matrix.os == 'windows-latest'
run: |
echo "Testing Windows executable..."
if (Test-Path "dist/android-bloatware-remover.exe") {
echo "Executable exists, running test..."
Start-Process -FilePath "dist/android-bloatware-remover.exe" -ArgumentList "--test" -Wait -NoNewWindow -PassThru
} else {
echo "Executable not found!"
exit 1
}
shell: powershell
timeout-minutes: 2
- name: Test executable (Unix)
if: matrix.os != 'windows-latest'
run: |
echo "Testing Unix executable..."
if [ -f "dist/android-bloatware-remover" ]; then
echo "Executable exists, running test..."
chmod +x dist/android-bloatware-remover
timeout 30s dist/android-bloatware-remover --test || echo "Test completed with timeout"
else
echo "Executable not found!"
exit 1
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: dist/${{ matrix.artifact_name }}
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: |
## Android Bloatware Remover ${{ github.ref_name }}
Standalone executables for Windows, Linux, and macOS.
### Download Instructions:
- **Windows**: Download `android-bloatware-remover-windows.exe`
- **Linux**: Download `android-bloatware-remover-linux`
- **macOS**: Download `android-bloatware-remover-macos`
### Usage:
1. Download the appropriate executable for your operating system
2. Make sure ADB is installed and in your PATH
3. Enable USB debugging on your Android device
4. Connect your device and run the executable
### Supported Devices:
- Samsung (One UI)
- Xiaomi/Redmi/POCO (MIUI)
- Oppo (ColorOS)
- Vivo/iQOO (FunTouch OS)
- Realme (Realme UI)
- Tecno (HiOS)
- OnePlus (OxygenOS)
- Huawei (EMUI/HarmonyOS)
- Honor (Magic UI)
- Motorola (My UX)
- Nothing (Nothing OS)
### Test Mode:
Run with `--test` flag to try without a connected device.
draft: false
prerelease: false
files: |
android-bloatware-remover-windows.exe/android-bloatware-remover.exe
android-bloatware-remover-linux/android-bloatware-remover
android-bloatware-remover-macos/android-bloatware-remover
fail_on_unmatched_files: false