Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 179 additions & 0 deletions .github/workflows/build-nuitka.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
name: Build with Nuitka

on:
push:
tags:
- 'v*'
branches:
- main
- master
- dev
paths:
- 'linux_do_gui.py'
- 'requirements.txt'
- 'icon.ico'
- 'docs/**'
pull_request:
paths:
- 'linux_do_gui.py'
- 'requirements.txt'
workflow_dispatch:
inputs:
version:
description: 'Version tag for release (e.g., v8.1.0)'
required: false
default: ''
Comment on lines +21 to +25
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow defines a version input for workflow_dispatch events but never uses it. The version is always derived from the git reference in the build job (if present), but there's no step to resolve the version like in the PyInstaller workflow. Consider either using the input.version value when provided, or removing the unused input parameter.

Suggested change
inputs:
version:
description: 'Version tag for release (e.g., v8.1.0)'
required: false
default: ''

Copilot uses AI. Check for mistakes.

env:
APP_NAME: LinuxDoHelper
PYTHON_VERSION: '3.11'

jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
artifact_name: LinuxDoHelper-nuitka-linux-amd64
- os: ubuntu-24.04-arm
artifact_name: LinuxDoHelper-nuitka-linux-arm64
- os: macos-15
artifact_name: LinuxDoHelper-nuitka-macos-arm64.app.zip
app_dir_name: LinuxDoHelper-nuitka-macos-arm64.app
- os: windows-2025
artifact_name: LinuxDoHelper-nuitka-windows-amd64.exe

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install nuitka ordered-set zstandard

- name: Install C compiler (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential patchelf

- name: Install C compiler (macOS)
if: runner.os == 'macOS'
run: |
xcode-select --install || true

- name: Build with Nuitka (macOS)
if: runner.os == 'macOS'
run: |
python -m nuitka \
--mode=app \
--assume-yes-for-downloads \
--enable-plugin=tk-inter \
--include-package=DrissionPage \
--include-package=pystray \
--include-package=PIL \
--include-data-file=icon.ico=icon.ico \
--output-filename=${{ env.APP_NAME }} \
--output-dir=dist \
linux_do_gui.py

- name: Build with Nuitka (Linux)
if: runner.os == 'Linux'
run: |
python -m nuitka \
--onefile \
--standalone \
--assume-yes-for-downloads \
--enable-plugin=tk-inter \
--include-package=DrissionPage \
--include-package=pystray \
--include-package=PIL \
--include-data-file=icon.ico=icon.ico \
--output-filename=${{ env.APP_NAME }} \
--output-dir=dist \
linux_do_gui.py

- name: Build with Nuitka (Windows)
if: runner.os == 'Windows'
run: |
python -m nuitka --onefile --standalone --assume-yes-for-downloads --enable-plugin=tk-inter --include-package=DrissionPage --include-package=pystray --include-package=PIL --include-data-file=icon.ico=icon.ico --output-filename=${{ env.APP_NAME }} --output-dir=dist linux_do_gui.py

- name: Rename artifact (macOS)
if: runner.os == 'macOS'
run: |
mv dist/${{ env.APP_NAME }}.app dist/${{ matrix.app_dir_name }}

- name: Zip macOS app
if: runner.os == 'macOS'
run: |
ditto -c -k --sequesterRsrc --keepParent dist/${{ matrix.app_dir_name }} dist/${{ matrix.artifact_name }}

- name: Rename artifact (Linux)
if: runner.os == 'Linux'
run: |
mv dist/${{ env.APP_NAME }} dist/${{ matrix.artifact_name }}

- name: Rename artifact (Windows)
if: runner.os == 'Windows'
run: |
move dist\${{ env.APP_NAME }}.exe dist\${{ matrix.artifact_name }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist/${{ matrix.artifact_name }}
retention-days: 30

release:
name: Create Release
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/

- name: Display artifacts
run: find artifacts/ -type f -o -type d

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.APP_NAME }} ${{ github.ref_name }} (Nuitka)
body: |
## ${{ env.APP_NAME }} ${{ github.ref_name }} (Nuitka Build)

### Downloads
- **Linux (x64)**: `LinuxDoHelper-nuitka-linux-amd64`
- **Linux (ARM64)**: `LinuxDoHelper-nuitka-linux-arm64`
- **macOS (Apple Silicon)**: `LinuxDoHelper-nuitka-macos-arm64.app.zip`
- **Windows (x64)**: `LinuxDoHelper-nuitka-windows-amd64.exe`

### Build Info
- Builder: Nuitka (compiled to native code)
- Python: ${{ env.PYTHON_VERSION }}

### Note
macOS builds use `--mode=app` to support GUI frameworks (Foundation/Tkinter).
files: |
artifacts/**/*
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158 changes: 158 additions & 0 deletions .github/workflows/build-pyinstaller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: Build with PyInstaller

on:
push:
tags:
- 'v*'
branches:
- main
- master
- dev
pull_request:
workflow_dispatch:
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow supports workflow_dispatch trigger but doesn't define any inputs. Consider adding a version input parameter similar to the Nuitka workflow to allow manual builds with specific version tags, or document that manual triggers will always create dev builds.

Copilot uses AI. Check for mistakes.

env:
APP_NAME: LinuxDoHelper
PYTHON_VERSION: '3.11'

jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
platform: linux-amd64
ext: ''
- os: ubuntu-24.04-arm
platform: linux-arm64
ext: ''
- os: macos-15
platform: macos-arm64
ext: ''
- os: windows-2025
platform: windows-amd64
ext: '.exe'

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Resolve version
id: version
shell: bash
run: |
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
VERSION="${GITHUB_REF_NAME}"
else
VERSION="dev-${GITHUB_SHA::7}"
fi
echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

- name: Install system deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y tk tcl libgtk-3-0

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller

- name: Build with PyInstaller (Unix)
if: runner.os != 'Windows'
run: |
pyinstaller --onefile --windowed --clean --noconfirm \
--name "${APP_NAME}" \
--hidden-import tkinter \
--hidden-import tkinter.ttk \
--hidden-import tkinter.scrolledtext \
--hidden-import DrissionPage \
--hidden-import pystray \
--hidden-import PIL \
--add-data "icon.ico:." \
linux_do_gui.py

- name: Build with PyInstaller (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
pyinstaller --onefile --windowed --clean --noconfirm `
--name "${env:APP_NAME}" `
--hidden-import tkinter `
--hidden-import tkinter.ttk `
--hidden-import tkinter.scrolledtext `
--hidden-import DrissionPage `
--hidden-import pystray `
--hidden-import PIL `
--add-data "icon.ico;." `
--icon icon.ico `
linux_do_gui.py

- name: Rename artifact (Unix)
if: runner.os != 'Windows'
run: |
mv "dist/${APP_NAME}" "dist/${APP_NAME}-pyinstaller-${{ steps.version.outputs.version }}-${{ matrix.platform }}"

- name: Rename artifact (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Move-Item "dist\\${env:APP_NAME}.exe" "dist\\${env:APP_NAME}-pyinstaller-${{ steps.version.outputs.version }}-${{ matrix.platform }}${{ matrix.ext }}"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-pyinstaller-${{ steps.version.outputs.version }}-${{ matrix.platform }}${{ matrix.ext }}
path: dist/${{ env.APP_NAME }}-pyinstaller-${{ steps.version.outputs.version }}-${{ matrix.platform }}${{ matrix.ext }}
retention-days: 30

release:
name: Create Release (PyInstaller)
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/

- name: Display artifacts
run: find artifacts/ -type f

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.APP_NAME }} ${{ github.ref_name }} (PyInstaller)
body: |
## ${{ env.APP_NAME }} ${{ github.ref_name }} (PyInstaller Build)

### Downloads
- Linux (x64): `${{ env.APP_NAME }}-pyinstaller-${{ github.ref_name }}-linux-amd64`
- Linux (ARM64): `${{ env.APP_NAME }}-pyinstaller-${{ github.ref_name }}-linux-arm64`
- macOS (Apple Silicon): `${{ env.APP_NAME }}-pyinstaller-${{ github.ref_name }}-macos-arm64`
- Windows (x64): `${{ env.APP_NAME }}-pyinstaller-${{ github.ref_name }}-windows-amd64.exe`

### Build Info
- Builder: PyInstaller
- Python: ${{ env.PYTHON_VERSION }}
files: |
artifacts/**
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 9 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ wheels/
*.log

# Local files
*.json
*.txt
*.html
*.png
*.pyw
nul
*.json
*.txt
*.html
*.png
*.pyw
nul
!requirements.txt
!requirements-*.txt

# IDE
.idea/
Expand All @@ -54,3 +56,4 @@ LDStatusPro/

# Dist folder (exe files are too large for git)
dist/
.DS_Store
Loading
Loading