diff --git a/.github/release-template/release-info.md b/.github/release-template/release-info.md new file mode 100644 index 00000000..3df8a714 --- /dev/null +++ b/.github/release-template/release-info.md @@ -0,0 +1,25 @@ +[使用文档](https://napneko.github.io/) + +## Windows 一键包 +我们为提供了的轻量化一键部署方案 +相对于普通需要安装QQ的方案,下面已内置QQ和Napcat 阅读使用文档参考 + +你可以下载 + +NapCat.Shell.Windows.OneKey.zip (无头) +NapCat.Framework.Windows.OneKey.zip (有头) + +启动后可自动化部署一键包,教程参考使用文档安装部分 + +## 警告 +**注意QQ版本推荐使用 40768+ 版本 最低可以使用40768版本** +**默认WebUi密钥为随机密码 控制台查看** + +**[9.9.22-40990 X64 Win](https://dldir1v6.qq.com/qqfile/qq/QQNT/2c9d3f6c/QQ9.9.22.40990_x64.exe)** +[LinuxX64 DEB 40990 ](https://dldir1.qq.com/qqfile/qq/QQNT/ec800879/linuxqq_3.2.20-40990_amd64.deb) +[LinuxX64 RPM 40990 ](https://dldir1.qq.com/qqfile/qq/QQNT/ec800879/linuxqq_3.2.20-40990_x86_64.rpm) +[LinuxArm64 DEB 40990 ](https://dldir1.qq.com/qqfile/qq/QQNT/ec800879/linuxqq_3.2.20-40990_arm64.deb) +[LinuxArm64 RPM 40990 ](https://dldir1.qq.com/qqfile/qq/QQNT/ec800879/linuxqq_3.2.20-40990_aarch64.rpm) +[MAC DMG 40990 ](https://dldir1v6.qq.com/qqfile/qq/QQNT/c6cb0f5d/QQ_v6.9.82.40990.dmg) +## 如果WinX64缺少运行库或者xxx.dll? +[安装运行库](https://aka.ms/vs/17/release/vc_redist.x64.exe) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7f61d82..998b75a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,19 +136,38 @@ jobs: - name: Extract version from tag run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV - - name: Clone Changes Log - run: curl -o CHANGELOG.md https://fastly.jsdelivr.net/gh/NapNeko/NapCatQQ@main/docs/changelogs/CHANGELOG.v${{ env.VERSION }}.md + - name: Download Windows OneKey Packages + run: | + LATEST_RELEASE=$(curl -s https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")') + echo "Latest release: $LATEST_RELEASE" + curl -L -o NapCat.Shell.Windows.OneKey.zip "https://github.com/NapNeko/NapCatQQ/releases/download/$LATEST_RELEASE/NapCat.Shell.Windows.OneKey.zip" || echo "Shell OneKey not found, will skip" + curl -L -o NapCat.Framework.Windows.OneKey.zip "https://github.com/NapNeko/NapCatQQ/releases/download/$LATEST_RELEASE/NapCat.Framework.Windows.OneKey.zip" || echo "Framework OneKey not found, will skip" + + - name: Generate Release Notes + run: | + # Create header with version + echo "# V${{ env.VERSION }} Refactor" > RELEASE_NOTES.md + + # Add fixed release information + cat .github/release-template/release-info.md >> RELEASE_NOTES.md + + # Add changelog section + echo "" >> RELEASE_NOTES.md + chmod +x ./script/generate-changelog.sh + ./script/generate-changelog.sh >> RELEASE_NOTES.md - name: Create Release Draft and Upload Artifacts uses: softprops/action-gh-release@v1 with: name: NapCat V${{ env.VERSION }} token: ${{ secrets.GITHUB_TOKEN }} - body_path: CHANGELOG.md + body_path: RELEASE_NOTES.md files: | NapCat.Framework.zip NapCat.Shell.zip NapCat.Framework.Windows.Once.zip + NapCat.Shell.Windows.OneKey.zip + NapCat.Framework.Windows.OneKey.zip draft: true build-docker: diff --git a/script/generate-changelog.sh b/script/generate-changelog.sh new file mode 100755 index 00000000..ebc796e8 --- /dev/null +++ b/script/generate-changelog.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Get the latest 10 commits excluding those starting with "release:" +echo "## 更新" +echo "" +git log --oneline -20 --pretty=format:"%s" | grep -v "^release:" | head -10 | while read -r line; do + echo "- $line" +done