Skip to content

更新打包脚本,使用wine打包exe #12

更新打包脚本,使用wine打包exe

更新打包脚本,使用wine打包exe #12

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*' # 只在标签以 "v" 开头时触发
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Wine and Python for Windows
run: |
sudo apt update
sudo apt install -y wine64 wget
wget https://www.python.org/ftp/python/3.11.0/python-3.11.0.exe
wine python-3.11.0.exe /quiet InstallAllUsers=1 PrependPath=1
- name: Verify Wine Python installation
run: |
wine ~/.wine/drive_c/Python311/python.exe --version
- name: Install dependencies
run: |
wine ~/.wine/drive_c/Python311/python.exe -m pip install --upgrade pip
wine ~/.wine/drive_c/Python311/python.exe -m pip install -r requirements.txt
- name: Run build script
run: wine ~/.wine/drive_c/Python311/python.exe build.py # 使用wine运行build.py
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}