Skip to content

feat: 打包方式修改 #155

feat: 打包方式修改

feat: 打包方式修改 #155

Workflow file for this run

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
end: ""
- os:
name: macos-14
filename: MacOS_amd64
end: ".dmg"
- os:
name: macos-12
filename: MacOS_x64
end: ".dmg"
- os:
name: windows-latest
filename: Windows
end: ".exe"
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 && pip install -r requirements.txt
- name: Build Pyinstaller
run: |
pyinstaller main.spec
# - name: Zip the Build-windows
# if: matrix.config.os.filename == 'Windows'
# run: Compress-Archive -Path ./dist/biliTicKerBuy -DestinationPath ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}-${{github.ref_name}}.zip
#
# - name: Zip the Build-linux
# if: matrix.config.os.filename == 'Linux'
# run: zip -r ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}-${{github.ref_name}}.zip ./dist/biliTickerBuy/*
#
#
# - name: Zip the Build-MacOS
# if: matrix.config.os.filename == 'MacOS_amd64' or matrix.config.os.filename == 'MacOS_x64'
# run: zip -r ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}-${{github.ref_name}}.zip ./dist/biliTickerBuy.app/*
- name: dmg create
if: matrix.config.os.filename == 'MacOS_amd64' || matrix.config.os.filename == 'MacOS_x64'
uses: L-Super/create-dmg-actons@v1.0.3
with:
dmg_name: dist/biliTickerBuy
src_dir: dist/biliTickerBuy.app
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: dist/biliTickerBuy${{ matrix.config.os.end }}
asset_name: ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}_${{ github.ref_name }}${{ matrix.config.os.end }}
tag: ${{ github.ref }}
overwrite: true