feat: 打包成单个文件时候的持久化 #424 #173
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
name: Build Executables | |
runs-on: ${{ matrix.config.os.name }} | |
strategy: | |
matrix: | |
config: | |
- os: | |
name: ubuntu-latest | |
filename: Linux | |
- os: | |
name: macos-14 | |
filename: MacOS_amd64 | |
- os: | |
name: macos-12 | |
filename: MacOS_x64 | |
- os: | |
name: windows-latest | |
filename: Windows | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
cache: 'pip' | |
- name: Upgrade setuptools, wheel, and install requirements | |
run: | | |
pip install --upgrade setuptools wheel pyinstaller~=5.13.2 && pip install -r requirements.txt | |
- name: Build Pyinstaller | |
shell: bash | |
run: | | |
PLAYWRIGHT_BROWSERS_PATH=0 playwright install chromium | |
pyinstaller main.spec | |
- name: Zip the Build-windows | |
if: matrix.config.os.filename == 'Windows' | |
run: Compress-Archive -Path ./dist/biliTicKerBuy.exe -DestinationPath tmp.zip | |
- name: Zip the Build-linux | |
if: matrix.config.os.filename != 'Windows' | |
run: | | |
cd ./dist | |
zip -r ../tmp.zip biliTickerBuy | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
file: tmp.zip | |
asset_name: ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}_${{ github.ref_name }}.zip | |
tag: ${{ github.ref }} | |
overwrite: true |