-
Notifications
You must be signed in to change notification settings - Fork 10
167 lines (146 loc) · 5.31 KB
/
build-release.yml
File metadata and controls
167 lines (146 loc) · 5.31 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
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: Test Python application first
run: |
echo "Testing Python application..."
python main.py --test &
sleep 5
pkill -f "python main.py" || true
echo "Python test completed"
shell: bash
- name: Create PyInstaller spec file
run: |
echo "Creating spec file..."
python build_spec.py
echo "Spec file created. Contents:"
cat android-bloatware-remover.spec
- name: Build with PyInstaller
run: |
echo "Building with PyInstaller..."
pyinstaller android-bloatware-remover.spec --clean --noconfirm
echo "Build completed. Checking dist directory:"
ls -la dist/
- name: Test executable
run: |
echo "Testing executable..."
if [ "${{ matrix.os }}" = "windows-latest" ]; then
if [ -f "dist/android-bloatware-remover.exe" ]; then
echo "Windows executable found"
# Just check if it starts without hanging
timeout 10s dist/android-bloatware-remover.exe --test || echo "Test completed"
else
echo "Windows executable not found!"
exit 1
fi
else
if [ -f "dist/android-bloatware-remover" ]; then
echo "Unix executable found"
chmod +x dist/android-bloatware-remover
# Just check if it starts without hanging
timeout 10s dist/android-bloatware-remover --test || echo "Test completed"
else
echo "Unix executable not found!"
exit 1
fi
fi
shell: bash
- 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: List downloaded artifacts
run: |
echo "Current directory contents:"
ls -la
echo "Looking for executables:"
find . -name "*android-bloatware-remover*" -type f
echo "Preparing files for release..."
- name: Prepare release files
run: |
mkdir -p release
# Copy and rename files for release
if [ -f "android-bloatware-remover-windows.exe/android-bloatware-remover.exe" ]; then
cp "android-bloatware-remover-windows.exe/android-bloatware-remover.exe" "release/android-bloatware-remover-windows.exe"
fi
if [ -f "android-bloatware-remover-linux/android-bloatware-remover" ]; then
cp "android-bloatware-remover-linux/android-bloatware-remover" "release/android-bloatware-remover-linux"
fi
if [ -f "android-bloatware-remover-macos/android-bloatware-remover" ]; then
cp "android-bloatware-remover-macos/android-bloatware-remover" "release/android-bloatware-remover-macos"
fi
echo "Release files prepared:"
ls -la release/
- 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: release/*
fail_on_unmatched_files: false