mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-07-03 02:32:16 +08:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: build Windows and Linux executables
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-exe:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
arch: [x64, arm64]
|
|
steps:
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Python 3.11
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install pyinstaller
|
|
run: python -m pip install pyinstaller
|
|
|
|
- name: Install dependencies
|
|
run: python -m pip install -r ./requirements.txt
|
|
|
|
- name: Build EXE
|
|
if: matrix.os == 'windows-latest'
|
|
env:
|
|
actions: T
|
|
run: pyinstaller -F --name lx-music-api-server_${{ github.sha }} main.py
|
|
- name: Build Linux Executable
|
|
if: matrix.os == 'ubuntu-latest'
|
|
env:
|
|
actions: E
|
|
run: pyinstaller -F --name lx-music-api-server_${{ github.sha }} main.py
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: lx-music-api-server
|
|
path: ./dist
|