Fix GitHub Actions workflow after successful local testing #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: List downloaded artifacts | |
| run: | | |
| echo "Current directory contents:" | |
| ls -la | |
| echo "Looking for artifact directories:" | |
| find . -name "*android-bloatware-remover*" -type f | |
| echo "All files:" | |
| find . -type f | |
| - 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-linux/* | |
| android-bloatware-remover-macos/* | |
| fail_on_unmatched_files: false |