Skip to content

[feat] 更改405界面 #107

[feat] 更改405界面

[feat] 更改405界面 #107

Workflow file for this run

name: Build and Release Python Binaries
on:
push:
branches:
- main
jobs:
build-linux:
runs-on: ubuntu-latest
container:
image: python:3.6-buster # 适配 NOI Linux 2.0 的 Python 3.6
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install PyInstaller for Linux
run: pip install pyinstaller
- name: Compile Python scripts for Linux
run: |
mkdir -p bin/linux
pyinstaller --onefile --distpath bin/linux LTS.py
rm LTS.spec
rm -rf build/
- name: Upload Linux binaries
uses: actions/upload-artifact@v4
with:
name: linux-binaries
path: bin/linux/
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.6' # 适配 Windows 7 的 Python 3.6
- name: Install PyInstaller for Windows
run: pip install pyinstaller
- name: Compile Python scripts for Windows
run: |
# 动态获取 Python 安装路径(适配 3.6 版本)
$site_packages = python -c "import site; print(site.getsitepackages()[0])"
mkdir -Force bin/windows
pyinstaller --onefile --distpath bin/windows LTS.py
Remove-Item -Path "LTS.spec" -Force
Remove-Item -Path ".\build" -Recurse -Force
- name: Upload Windows binaries
uses: actions/upload-artifact@v4
with:
name: windows-binaries
path: bin/windows/
prerelease-upload:
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
if: success()
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Windows binaries
uses: actions/download-artifact@v4
with:
name: windows-binaries
path: bin/windows/
- name: Download Linux binaries
uses: actions/download-artifact@v4
with:
name: linux-binaries
path: bin/linux/
- name: Create Development Build Pre-release
uses: ncipollo/release-action@v1
with:
tag: dev-build
name: Development Build
body: |
这是一个基于 `main` 分支最新代码的自动版本。
Commit SHA: ${{ github.sha }}
提示:
- 此版本为开发测试版,可能包含不稳定的功能或未知的错误。
- 不建议用于生产环境或正式用途。
prerelease: true
allowUpdates: true
artifacts: |
bin/windows/*
bin/linux/*
LTS.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}