feat: 多系统打包 #141
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-13-xlarge | |
filename: MacOS_amd64 | |
- os: | |
name: macos-13 | |
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 | |
- uses: vimtor/action-zip@v1 | |
with: | |
files: dist | |
recursive: false | |
dest: ${{ secrets.ReleaseZipName }}_${{ matrix.config.os.filename }}-${{github.ref_name}}.zip | |
- 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 }} |