Skip to content

feat: 多系统打包 #144

feat: 多系统打包

feat: 多系统打包 #144

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
- os:
name: macos-14
filename: MacOS_amd64
- os:
name: macos-12
filename: MacOS_x86_64
- 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: Install dependencies
run: |
pip install pyinstaller Pillow
working-directory: ./
- name: upgrade wheel
run: |
pip install --upgrade setuptools wheel
working-directory: ./
- name: Install requirements
run: |
pip install -r requirements.txt
working-directory: ./
- name: Build Pyinstaller
shell: bash -l {0}
run: |
pyinstaller bilibili-buy.spec
- name: Zip the Build-windows
if: matrix.config.os.filename == 'Windows'
run: Compress-Archive -Path ./dist/biliTicerBuy -DestinationPath ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}-${{github.ref_name}}.zip
- name: Zip the Build-unix
if: matrix.config.os.filename != 'Windows'
run: tar -cvp --preserve-permissions -f ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}-${{github.ref_name}}.tar ./dist/biliTicerBuy
- uses: softprops/action-gh-release@v1
with:
files: ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}-${{github.ref_name}}.zip
update_release_draft:
permissions:
contents: write # for release-drafter/release-drafter to create a github release
pull-requests: write # for release-drafter/release-drafter to add label to PR
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}