- 全新Tkinter图形界面, 三端UI一致 - 支持LittleSkin等authlib-injector第三方登录 - 自动下载注入authlib-injector.jar - 保留CLI模式, Windows打包改为无控制台窗口
88 lines
2.4 KiB
YAML
88 lines
2.4 KiB
YAML
name: Build Installers
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ${{ matrix.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: Windows
|
|
os: windows-latest
|
|
pyinstaller: pyinstaller --onefile --windowed --name MeowLauncher --clean launcher.py
|
|
package: cp dist/MeowLauncher.exe MeowLauncher-windows-x86_64.exe
|
|
- name: Linux
|
|
os: ubuntu-latest
|
|
pyinstaller: pyinstaller --onefile --name MeowLauncher --clean launcher.py
|
|
package: |
|
|
tar -czf MeowLauncher-linux-x86_64.tar.gz dist/MeowLauncher
|
|
cp dist/MeowLauncher MeowLauncher-linux-x86_64
|
|
- name: macOS
|
|
os: macos-latest
|
|
pyinstaller: pyinstaller --onefile --windowed --name MeowLauncher --clean --osx-bundle-identifier com.meowlauncher.app launcher.py
|
|
package: |
|
|
zip -r MeowLauncher-macos.zip dist/MeowLauncher.app
|
|
cp dist/MeowLauncher MeowLauncher-macos-x86_64 2>/dev/null || true
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 安装 Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: 安装 PyInstaller
|
|
run: pip install pyinstaller
|
|
|
|
- name: 打包
|
|
shell: bash
|
|
run: ${{ matrix.pyinstaller }}
|
|
|
|
- name: 制作安装包
|
|
shell: bash
|
|
run: ${{ matrix.package }}
|
|
|
|
- name: 上传构建产物
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: MeowLauncher-${{ matrix.name }}
|
|
path: |
|
|
MeowLauncher-windows-x86_64.exe
|
|
MeowLauncher-linux-x86_64
|
|
MeowLauncher-linux-x86_64.tar.gz
|
|
MeowLauncher-macos-x86_64
|
|
MeowLauncher-macos.zip
|
|
if-no-files-found: warn
|
|
|
|
release:
|
|
name: 发布 Release
|
|
needs: build
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 下载全部产物
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
merge-multiple: true
|
|
|
|
- name: 列出产物
|
|
run: find artifacts -type f -exec ls -lh {} \;
|
|
|
|
- name: 发布到 GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: artifacts/*
|
|
generate_release_notes: true
|