mirror of
https://github.com/xgui4/LCE-Qt-Launcher.git
synced 2026-07-18 03:40:50 +00:00
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: Build and Deploy Nightly
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- nightly
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Nightly
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install . nuitka zstandard
|
|
|
|
- name: Build with Nuitka
|
|
run: |
|
|
hatch run python -m nuitka --standalone --assume-yes-for-download --output-dir=dist src/lce_qt_launcher/main.py
|
|
|
|
- name: Package Windows
|
|
if: matrix.os == 'windows-latest'
|
|
shell: pwsh
|
|
run: Compress-Archive -Path dist/main.dist/* -DestinationPath LCE-Qt-Launcher-Windows.zip
|
|
|
|
- name: Package Linux
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: tar -czf LCE-Qt-Launcher-Linux.tar.gz -C dist/main.dist .
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-${{ matrix.os }}
|
|
path: |
|
|
*.zip
|
|
*.tar.gz
|
|
|
|
release:
|
|
name: Create Nightly Release
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: ./artifacts
|
|
merge-multiple: true
|
|
|
|
- name: Upload Nightly
|
|
uses: andelf/nightly-release@main
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: nightly
|
|
name: Nightly Release
|
|
body: "Experimental Build (Nightly) generated by GitHub Action."
|
|
files: |
|
|
./artifacts/*.zip
|
|
./artifacts/*.tar.gz |