From 7003b25e0fb07d1de7f8c2ca7d23858128b58bb9 Mon Sep 17 00:00:00 2001 From: rambros Date: Sun, 22 Feb 2026 01:43:48 +0530 Subject: [PATCH] add github release --- .github/workflows/release.yml | 89 +++++++++++++++++++++++++++++++++++ README.md | 11 +++-- fluxer-reaper.spec | 42 +++++++++++++++++ 3 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 fluxer-reaper.spec diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b196bc6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,89 @@ +name: Build and Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + include: + - os: ubuntu-latest + artifact_name: fluxer-reaper-linux + asset_name: fluxer-reaper-linux.zip + executable_path: dist/fluxer-reaper + - os: windows-latest + artifact_name: fluxer-reaper-windows + asset_name: fluxer-reaper-windows.zip + executable_path: dist/fluxer-reaper.exe + + steps: + - name: Checkout code + 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 -r requirements.txt + pip install pyinstaller + + - name: Build with PyInstaller + run: pyinstaller fluxer-reaper.spec + + - name: Prepare Release Asset (Linux) + if: matrix.os == 'ubuntu-latest' + run: | + chmod +x ${{ matrix.executable_path }} + # Generate launcher script + cat << 'EOF' > dist/Launch-Reaper.sh + #!/bin/bash + BASEDIR=$(dirname "$0") + cd "$BASEDIR" + ./fluxer-reaper + EOF + chmod +x dist/Launch-Reaper.sh + zip -j ${{ matrix.asset_name }} ${{ matrix.executable_path }} dist/Launch-Reaper.sh config.example.yaml + + - name: Prepare Release Asset (Windows) + if: matrix.os == 'windows-latest' + run: | + # Generate launcher script + echo '@echo off' > dist\Launch-Reaper.bat + echo 'cd /d "%~dp0"' >> dist\Launch-Reaper.bat + echo 'fluxer-reaper.exe' >> dist\Launch-Reaper.bat + powershell Compress-Archive -Path "${{ matrix.executable_path }}", "dist\Launch-Reaper.bat", "config.example.yaml" -DestinationPath "${{ matrix.asset_name }}" + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.artifact_name }} + path: ${{ matrix.asset_name }} + + release: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: | + artifacts/fluxer-reaper-linux/fluxer-reaper-linux.zip + artifacts/fluxer-reaper-windows/fluxer-reaper-windows.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 13d8a7d..3939d77 100644 --- a/README.md +++ b/README.md @@ -24,18 +24,23 @@ Simply run the downloaded file to start the tool. No Python installation is requ ## Build tool -To create a standalone executable, simply run: +To create a standalone executable: +### Linux / Mac ```bash chmod +x build.sh ./build.sh ``` -The script will automatically set up a virtual environment, install dependencies, and generate the binary in the `dist/` folder. +### Windows +1. Make sure you have [Python](https://www.python.org/) installed and added to your PATH. +2. Double-click `build.bat`. + +The scripts will automatically set up a virtual environment, install dependencies, and generate the binary in the `dist/` folder. ## Vibe Code Notice Code is provided as is; This tool was developed largely by AI. -Take it, use it, modify it, feel free to whatever you wish. \ No newline at end of file +Take it, use it, modify it, feel free to do whatever you wish. \ No newline at end of file diff --git a/fluxer-reaper.spec b/fluxer-reaper.spec new file mode 100644 index 0000000..989754b --- /dev/null +++ b/fluxer-reaper.spec @@ -0,0 +1,42 @@ +# -*- mode: python ; coding: utf-8 -*- +from PyInstaller.utils.hooks import collect_submodules + +hiddenimports = [] +hiddenimports += collect_submodules('rich._unicode_data') + + +a = Analysis( + ['fluxer-reaper.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=hiddenimports, + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='fluxer-reaper', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +)