-
-
Notifications
You must be signed in to change notification settings - Fork 17
72 lines (67 loc) · 2.15 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
66
67
68
69
70
71
72
name: 发行
run-name: 发行
on:
workflow_dispatch:
inputs:
tag:
description: "版本号"
required: true
default: vx.x.x
jobs:
Build:
name: 编译
runs-on: windows-2022
permissions: write-all
steps:
- name: 仓库检出
uses: actions/checkout@v4
- name: 设置 Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: 安装依赖
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -U nuitka==2.5.1 zstandard ordered-set
- name: 编译
run: python -m nuitka --mingw64 --assume-yes-for-downloads --standalone --windows-uac-admin --remove-output --windows-console-mode="disable" --jobs=8 --enable-plugins="pyqt5" --output-dir="dist" --main="main.py" --windows-icon-from-ico="icon.ico" --company-name="DaYe" --product-name="WindowsCleaner" --file-version="5.0.0" --product-version="5.0" --file-description="WindowsCleaner" --copyright="DaYe" --trademarks="DaYe"
- name: 移动文件
run: move WCMain dist/main.dist/WCMain
- name: 上传文件
uses: actions/upload-artifact@v4
with:
name: WindowsCleaner
path: dist
- name: 生成安装包
uses: Minionguyjpro/[email protected]
with:
path: script.iss
options: /O+
- name: 上传文件
uses: actions/upload-artifact@v4
with:
name: WindowsCleaner-amd64-Setup
path: releases/*.exe
Release:
needs: [Build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 下载附件
uses: actions/download-artifact@v4
with:
path: artifacts
- name: 压缩绿化版
run: |
zip -r WindowsCleaner.zip artifacts/WindowsCleaner
- name: 发行
uses: softprops/action-gh-release@v2
with:
name: ${{ inputs.tag }}
tag_name: ${{ inputs.tag }}
draft: false
make_latest: true
files: |
WindowsCleaner.zip
artifacts/WindowsCleaner-amd64-Setup/*.exe