-
Notifications
You must be signed in to change notification settings - Fork 196
65 lines (55 loc) · 1.67 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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