🎈 ci: 测试Release #8
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: 构建发布 | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # 匹配版本标签 | |
- 'test*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: "检出代码" | |
uses: actions/checkout@v2 | |
- name: "设置 Python" | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' | |
- name: "安装 PDM" | |
run: | | |
(Invoke-WebRequest -Uri https://pdm-project.org/install-pdm.py -UseBasicParsing).Content | python - | |
$env:Path += ";$env:USERPROFILE\AppData\Roaming\Python\Scripts" | |
- name: "安装依赖" | |
run: pdm install | |
- uses: Nuitka/Nuitka-Action@main | |
name: "构建 Windows 版本" | |
with: | |
script-name: main.py | |
onefile: true | |
enable-plugins: pyside6 | |
disable-console: true | |
windows-icon-from-ico: src/Ui/resource/image/icon.ico | |
output-filename: "NapCat-Desktop" | |
- name: "启用开发者命令提示符" | |
uses: ilammy/[email protected] | |
- name: "添加清单文件" | |
run: | | |
mt.exe -manifest ./assets/NapCat-Desktop.exe.manifest -outputresource:./build/NapCat-Desktop.exe;1 | |
- name: "上传工件" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NapCat-Desktop | |
path: ./build/NapCat-Desktop.exe |