update release workflow for DiscoReaper

This commit is contained in:
rambros 2026-03-04 16:08:04 +05:30
parent bb805c7cfe
commit 07fce69c51
5 changed files with 41 additions and 42 deletions

View file

@ -13,17 +13,17 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
include: include:
- os: ubuntu-latest - os: ubuntu-latest
artifact_name: server-shuttle-linux artifact_name: disco-reaper-linux
asset_name: server-shuttle-linux.zip asset_name: disco-reaper-linux.zip
executable_path: dist/server-shuttle executable_path: dist/DiscoReaper
- os: windows-latest - os: windows-latest
artifact_name: server-shuttle-windows artifact_name: disco-reaper-windows
asset_name: server-shuttle-windows.zip asset_name: disco-reaper-windows.zip
executable_path: dist/server-shuttle.exe executable_path: dist/DiscoReaper.exe
- os: macos-latest - os: macos-latest
artifact_name: server-shuttle-macos artifact_name: disco-reaper-macos
asset_name: server-shuttle-macos.zip asset_name: disco-reaper-macos.zip
executable_path: dist/server-shuttle executable_path: dist/DiscoReaper
steps: steps:
- name: Checkout code - name: Checkout code
@ -45,27 +45,27 @@ jobs:
shell: python shell: python
run: | run: |
from PIL import Image from PIL import Image
img = Image.open('server-shuttle-icon.png') img = Image.open('disco-reaper-icon.png')
img.save('server-shuttle-icon.ico', format='ICO', sizes=[(256, 256)]) img.save('disco-reaper-icon.ico', format='ICO', sizes=[(256, 256)])
- name: Build with PyInstaller - name: Build with PyInstaller
run: | run: |
echo "Listing directory contents:" echo "Listing directory contents:"
ls -R || dir /s ls -R || dir /s
pyinstaller server-shuttle.spec pyinstaller disco-reaper.spec
- name: Prepare Release Asset (Linux/MacOS) - name: Prepare Release Asset (Linux/MacOS)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: | run: |
cp ${{ matrix.executable_path }} server-shuttle cp ${{ matrix.executable_path }} DiscoReaper
chmod +x server-shuttle chmod +x DiscoReaper
zip ${{ matrix.asset_name }} server-shuttle zip ${{ matrix.asset_name }} DiscoReaper
- name: Prepare Release Asset (Windows) - name: Prepare Release Asset (Windows)
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
run: | run: |
copy ${{ matrix.executable_path }} server-shuttle.exe copy ${{ matrix.executable_path }} DiscoReaper.exe
powershell Compress-Archive -Path "server-shuttle.exe" -DestinationPath "${{ matrix.asset_name }}" powershell Compress-Archive -Path "DiscoReaper.exe" -DestinationPath "${{ matrix.asset_name }}"
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -88,8 +88,8 @@ jobs:
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
files: | files: |
artifacts/server-shuttle-linux/server-shuttle-linux.zip artifacts/disco-reaper-linux/disco-reaper-linux.zip
artifacts/server-shuttle-windows/server-shuttle-windows.zip artifacts/disco-reaper-windows/disco-reaper-windows.zip
artifacts/server-shuttle-macos/server-shuttle-macos.zip artifacts/disco-reaper-macos/disco-reaper-macos.zip
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -3,7 +3,7 @@
# Exit on error # Exit on error
set -e set -e
echo "--- Server Shuttle Cross-Distro Build Script ---" echo "--- Disco-Reaper Cross-Distro Build Script ---"
echo "NOTE: For maximum compatibility (glibc), run this on your oldest target Linux distribution." echo "NOTE: For maximum compatibility (glibc), run this on your oldest target Linux distribution."
# Check for venv # Check for venv
@ -38,32 +38,31 @@ echo "Cleaning previous build artifacts..."
rm -rf build/ dist/ rm -rf build/ dist/
echo "Starting PyInstaller build..." echo "Starting PyInstaller build..."
pyinstaller --clean server-shuttle.spec pyinstaller --clean disco-reaper.spec
echo "Generating Launch-Shuttle.sh launcher..." echo "Generating Launch-Reaper.sh launcher..."
cat << 'EOF' > dist/Launch-Shuttle.sh cat << 'EOF' > dist/Launch-Reaper.sh
#!/bin/bash #!/bin/bash
# Convenient launcher for Server Shuttle # Convenient launcher for Disco-Reaper
# Ensures it runs in a terminal if possible, but the binary also has internal auto-terminal logic. # Ensures it runs in a terminal if possible, but the binary also has internal auto-terminal logic.
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")
cd "$BASEDIR" cd "$BASEDIR"
if [ -f "./server-shuttle" ]; then if [ -f "./DiscoReaper" ]; then
./server-shuttle ./DiscoReaper
else else
echo "Error: server-shuttle binary not found in $(pwd)" echo "Error: DiscoReaper binary not found in $(pwd)"
read -p "Press enter to exit..." read -p "Press enter to exit..."
fi fi
EOF EOF
chmod +x dist/Launch-Shuttle.sh chmod +x dist/Launch-Reaper.sh
echo "Packaging release: server-shuttle-linux.zip..." echo "Packaging release: disco-reaper-linux.zip..."
cp config.example.yaml dist/
cd dist cd dist
if command -v zip >/dev/null 2>&1; then if command -v zip >/dev/null 2>&1; then
zip -q server-shuttle-linux.zip server-shuttle Launch-Shuttle.sh config.example.yaml zip -q disco-reaper-linux.zip DiscoReaper Launch-Reaper.sh
echo "Package created: dist/server-shuttle-linux.zip" echo "Package created: dist/disco-reaper-linux.zip"
else else
echo "Warning: 'zip' command not found. Skipping zip creation." echo "Warning: 'zip' command not found. Skipping zip creation."
echo "Files available in dist/ directory." echo "Files available in dist/ directory."
@ -72,7 +71,7 @@ cd ..
echo "-----------------------------------" echo "-----------------------------------"
echo "Build complete!" echo "Build complete!"
echo "Standalone executable: dist/server-shuttle" echo "Standalone executable: dist/DiscoReaper"
echo "Launcher script: dist/Launch-Shuttle.sh" echo "Launcher script: dist/Launch-Reaper.sh"
echo "Release Package: dist/server-shuttle-linux.zip" echo "Release Package: dist/disco-reaper-linux.zip"
echo "---" echo "---"

BIN
disco-reaper-icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

View file

@ -13,15 +13,15 @@ hiddenimports += collect_submodules('rich._unicode_data')
# Determine the best icon to use # Determine the best icon to use
icon_file = None icon_file = None
if os.path.exists('server-shuttle-icon.ico'): if os.path.exists('disco-reaper-icon.ico'):
icon_file = 'server-shuttle-icon.ico' icon_file = 'disco-reaper-icon.ico'
elif os.path.exists('server-shuttle-icon.png'): elif os.path.exists('disco-reaper-icon.png'):
icon_file = 'server-shuttle-icon.png' icon_file = 'disco-reaper-icon.png'
print(f"DEBUG: Selected icon_file = {icon_file}") print(f"DEBUG: Selected icon_file = {icon_file}")
a = Analysis( a = Analysis(
['server-shuttle.py'], ['disco-reaper.py'],
pathex=[], pathex=[],
binaries=[], binaries=[],
datas=[], datas=[],
@ -42,7 +42,7 @@ exe = EXE(
a.zipfiles, a.zipfiles,
a.datas, a.datas,
[], [],
name='server-shuttle', name='DiscoReaper',
debug=False, debug=False,
bootloader_ignore_signals=False, bootloader_ignore_signals=False,
strip=False, strip=False,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB