🎈 ci: 测试Release #5
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: Build Release | ||
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 - | ||
- 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: Enable Developer Command Prompt | ||
uses: ilammy/[email protected] | ||
- name: Add Manifest | ||
run: | | ||
mt.exe -manifest ./assets/NapCat-Desktop.exe.manifest -outputresource:./build/NapCat-Desktop.exe;1 | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: NapCat-Desktop | ||
path: ./build/NapCat-Desktop.exe |