Skip to content

🎈 ci: 测试Release #10

🎈 ci: 测试Release

🎈 ci: 测试Release #10

Workflow file for this run

name: 构建发布
on:
push:
tags:
- 'v*.*.*' # 匹配版本标签
- 'ci*'
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.11'
- name: "安装依赖"
run: pip install -r requirements.txt
- 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
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: "检出代码"
uses: actions/checkout@v2
- name: "下载工件"
uses: actions/download-artifact@v3
with:
name: NapCat-Desktop
- name: "设置 body 内容"
id: get_body
run: echo "::set-output name=body::$(cat docs/CHANGELOG.md)"
- name: "创建发布草案"
id: create_release
uses: softprops/action-gh-release@v1
with:
files: "./NapCat-Desktop.exe"
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: "NapCat Release ${{ github.ref }}"
body: ${{ steps.get_body.outputs.body }}