add github release
This commit is contained in:
parent
7180b0a3f7
commit
7003b25e0f
3 changed files with 139 additions and 3 deletions
89
.github/workflows/release.yml
vendored
Normal file
89
.github/workflows/release.yml
vendored
Normal file
|
|
@ -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 }}
|
||||||
11
README.md
11
README.md
|
|
@ -24,18 +24,23 @@ Simply run the downloaded file to start the tool. No Python installation is requ
|
||||||
|
|
||||||
|
|
||||||
## Build tool
|
## Build tool
|
||||||
To create a standalone executable, simply run:
|
To create a standalone executable:
|
||||||
|
|
||||||
|
### Linux / Mac
|
||||||
```bash
|
```bash
|
||||||
chmod +x build.sh
|
chmod +x build.sh
|
||||||
./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
|
## Vibe Code Notice
|
||||||
|
|
||||||
Code is provided as is; This tool was developed largely by AI.
|
Code is provided as is; This tool was developed largely by AI.
|
||||||
|
|
||||||
Take it, use it, modify it, feel free to whatever you wish.
|
Take it, use it, modify it, feel free to do whatever you wish.
|
||||||
42
fluxer-reaper.spec
Normal file
42
fluxer-reaper.spec
Normal file
|
|
@ -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,
|
||||||
|
)
|
||||||
Loading…
Add table
Reference in a new issue