-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (81 loc) · 2.09 KB
/
build.yml
File metadata and controls
97 lines (81 loc) · 2.09 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
name: Build App
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, macos-latest, macos-13, ubuntu-latest ]
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pyinstaller
- name: Build
if: matrix.os == 'windows-latest' || matrix.os == 'ubuntu-latest'
run: pyinstaller build.spec
- name: Build (macOS)
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13'
run: pyinstaller build-mac.spec
- name: Zip (Windows)
if: matrix.os == 'windows-latest'
run: |
cd dist
7z a -r BangumiRenamer_windows.zip *
- name: Zip (macOS-arm)
if: matrix.os == 'macos-latest'
run: |
cd dist
zip -9 -r BangumiRenamer_mac_arm.zip ./BangumiRenamer.app
- name: Zip (macOS-x86)
if: matrix.os == 'macos-13'
run: |
cd dist
zip -9 -r BangumiRenamer_mac_x86.zip ./BangumiRenamer.app
- name: Zip (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
cd dist
zip -9 -r BangumiRenamer_linux.zip ./*
- name: Upload
uses: actions/upload-artifact@v4
with:
path: dist/*.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v4
with:
path: asset
- name: Dist
run: |
mkdir dist
cp -r asset/artifact/* dist
cd dist && ls
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: tag
draft: true
files: dist/*
name: 🎉
body: |
## 新增
- 新增内容
## 优化
- 优化内容