feat: improve release workflow and update community stats to Top 6

This commit is contained in:
fujie
2026-01-07 22:35:24 +08:00
parent 7d5a696106
commit 1e0f5fb65a
7 changed files with 67 additions and 46 deletions

View File

@@ -42,13 +42,13 @@ jobs:
- name: Check for changes
id: check_changes
run: |
git diff --quiet docs/community-stats.md docs/community-stats.en.md README.md README_CN.md || echo "changed=true" >> $GITHUB_OUTPUT
git diff --quiet docs/community-stats.zh.md docs/community-stats.md README.md README_CN.md || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add docs/community-stats.md docs/community-stats.en.md docs/community-stats.json README.md README_CN.md
git commit -m "📊 更新社区统计数据 $(date +'%Y-%m-%d')"
git add docs/community-stats.zh.md docs/community-stats.md docs/community-stats.json README.md README_CN.md
git commit -m "chore: update community stats $(date +'%Y-%m-%d')"
git push

View File

@@ -193,10 +193,16 @@ jobs:
TODAY_PREFIX="v${TODAY}-"
# Count existing releases with today's date prefix
EXISTING_COUNT=$(gh release list --limit 100 | grep -c "^${TODAY_PREFIX}" || echo "0")
# Use || true to prevent script failure, and default to 0 if gh fails
EXISTING_COUNT=$(gh release list --limit 100 2>/dev/null | grep -c "^${TODAY_PREFIX}" || echo "0")
NEXT_NUM=$((EXISTING_COUNT + 1))
VERSION="${TODAY_PREFIX}${NEXT_NUM}"
# Final fallback to ensure VERSION is never empty
if [ -z "$VERSION" ]; then
VERSION="v$(date +'%Y.%m.%d-%H%M%S')"
fi
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Release version: $VERSION"
@@ -334,13 +340,28 @@ jobs:
echo "=== Release Notes ==="
cat release_notes.md
- name: Create Git Tag
run: |
VERSION="${{ steps.version.outputs.version }}"
if ! git rev-parse "$VERSION" >/dev/null 2>&1; then
echo "Creating tag $VERSION"
git tag "$VERSION"
git push origin "$VERSION"
else
echo "Tag $VERSION already exists"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.version }}
target_commitish: ${{ github.sha }}
name: ${{ github.event.inputs.release_title || steps.version.outputs.version }}
body_path: release_notes.md
prerelease: ${{ github.event.inputs.prerelease || false }}
make_latest: true
files: |
plugin_versions.json
env:

View File

@@ -17,7 +17,7 @@ A collection of enhancements, plugins, and prompts for [OpenWebUI](https://githu
|:---:|:---:|:---:|:---:|:---:|
| **11** | **874** | **9244** | **55** | **48** |
### 🔥 Top 5 Popular Plugins
### 🔥 Top 6 Popular Plugins
| Rank | Plugin | Downloads | Views |
|:---:|------|:---:|:---:|

View File

@@ -17,7 +17,7 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
|:---:|:---:|:---:|:---:|:---:|
| **11** | **874** | **9244** | **55** | **48** |
### 🔥 热门插件 Top 5
### 🔥 热门插件 Top 6
| 排名 | 插件 | 下载 | 浏览 |
|:---:|------|:---:|:---:|
@@ -27,7 +27,7 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
| 4⃣ | [Flash Card ](https://openwebui.com/posts/flash_card_65a2ea8f) | 82 | 1520 |
| 5⃣ | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | 78 | 1056 |
*完整统计请查看 [社区统计报告](./docs/community-stats.md)*
*完整统计请查看 [社区统计报告](./docs/community-stats.zh.md)*
<!-- STATS_END -->
## 📦 项目内容

View File

@@ -1,26 +1,26 @@
# 📊 OpenWebUI 社区统计报告
# 📊 OpenWebUI Community Stats Report
> 📅 更新时间: 2026-01-07 22:09
> 📅 Updated: 2026-01-07 22:09
## 📈 总览
## 📈 Overview
| 指标 | 数值 |
| Metric | Value |
|------|------|
| 📝 发布数量 | 11 |
| ⬇️ 总下载量 | 874 |
| 👁️ 总浏览量 | 9244 |
| 👍 总点赞数 | 55 |
| 💾 总收藏数 | 48 |
| 💬 总评论数 | 15 |
| 📝 Total Posts | 11 |
| ⬇️ Total Downloads | 874 |
| 👁️ Total Views | 9244 |
| 👍 Total Upvotes | 55 |
| 💾 Total Saves | 48 |
| 💬 Total Comments | 15 |
## 📂 按类型分类
## 📂 By Type
- **action**: 9
- **filter**: 2
## 📋 发布列表
## 📋 Posts List
| 排名 | 标题 | 类型 | 版本 | 下载 | 浏览 | 点赞 | 收藏 | 更新日期 |
| Rank | Title | Type | Version | Downloads | Views | Upvotes | Saves | Updated |
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| 1 | [Turn Any Text into Beautiful Mind Maps](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.1 | 276 | 2409 | 10 | 15 | 2026-01-06 |
| 2 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.6 | 173 | 479 | 3 | 3 | 2026-01-03 |

View File

@@ -1,26 +1,26 @@
# 📊 OpenWebUI Community Stats Report
# 📊 OpenWebUI 社区统计报告
> 📅 Updated: 2026-01-07 22:09
> 📅 更新时间: 2026-01-07 22:09
## 📈 Overview
## 📈 总览
| Metric | Value |
| 指标 | 数值 |
|------|------|
| 📝 Total Posts | 11 |
| ⬇️ Total Downloads | 874 |
| 👁️ Total Views | 9244 |
| 👍 Total Upvotes | 55 |
| 💾 Total Saves | 48 |
| 💬 Total Comments | 15 |
| 📝 发布数量 | 11 |
| ⬇️ 总下载量 | 874 |
| 👁️ 总浏览量 | 9244 |
| 👍 总点赞数 | 55 |
| 💾 总收藏数 | 48 |
| 💬 总评论数 | 15 |
## 📂 By Type
## 📂 按类型分类
- **action**: 9
- **filter**: 2
## 📋 Posts List
## 📋 发布列表
| Rank | Title | Type | Version | Downloads | Views | Upvotes | Saves | Updated |
| 排名 | 标题 | 类型 | 版本 | 下载 | 浏览 | 点赞 | 收藏 | 更新日期 |
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| 1 | [Turn Any Text into Beautiful Mind Maps](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action | 0.9.1 | 276 | 2409 | 10 | 15 | 2026-01-06 |
| 2 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action | 0.3.6 | 173 | 479 | 3 | 3 | 2026-01-03 |

View File

@@ -339,8 +339,8 @@ class OpenWebUIStats:
stats: 统计数据
lang: 语言 ("zh" 中文, "en" 英文)
"""
# 获取 Top 5 插件
top_plugins = stats["posts"][:5]
# 获取 Top 6 插件
top_plugins = stats["posts"][:6]
# 中英文文本
texts = {
@@ -349,17 +349,17 @@ class OpenWebUIStats:
"updated": f"> 🕐 自动更新于 {get_beijing_time().strftime('%Y-%m-%d %H:%M')}",
"author_header": "| 👤 作者 | 👥 粉丝 | ⭐ 积分 | 🏆 贡献 |",
"header": "| 📝 发布 | ⬇️ 下载 | 👁️ 浏览 | 👍 点赞 | 💾 收藏 |",
"top5_title": "### 🔥 热门插件 Top 5",
"top5_header": "| 排名 | 插件 | 下载 | 浏览 |",
"full_stats": "*完整统计请查看 [社区统计报告](./docs/community-stats.md)*",
"top6_title": "### 🔥 热门插件 Top 6",
"top6_header": "| 排名 | 插件 | 下载 | 浏览 |",
"full_stats": "*完整统计请查看 [社区统计报告](./docs/community-stats.zh.md)*",
},
"en": {
"title": "## 📊 Community Stats",
"updated": f"> 🕐 Auto-updated: {get_beijing_time().strftime('%Y-%m-%d %H:%M')}",
"author_header": "| 👤 Author | 👥 Followers | ⭐ Points | 🏆 Contributions |",
"header": "| 📝 Posts | ⬇️ Downloads | 👁️ Views | 👍 Upvotes | 💾 Saves |",
"top5_title": "### 🔥 Top 5 Popular Plugins",
"top5_header": "| Rank | Plugin | Downloads | Views |",
"top6_title": "### 🔥 Top 6 Popular Plugins",
"top6_header": "| Rank | Plugin | Downloads | Views |",
"full_stats": "*See full stats in [Community Stats Report](./docs/community-stats.md)*",
},
}
@@ -395,13 +395,13 @@ class OpenWebUIStats:
)
lines.append("")
# Top 5 热门插件
lines.append(t["top5_title"])
# Top 6 热门插件
lines.append(t["top6_title"])
lines.append("")
lines.append(t["top5_header"])
lines.append(t["top6_header"])
lines.append("|:---:|------|:---:|:---:|")
medals = ["🥇", "🥈", "🥉", "4", "5"]
medals = ["🥇", "🥈", "🥉", "4", "5", "6"]
for i, post in enumerate(top_plugins):
medal = medals[i] if i < len(medals) else str(i + 1)
lines.append(
@@ -520,14 +520,14 @@ def main():
script_dir = Path(__file__).parent.parent
# 中文报告
md_zh_path = script_dir / "docs" / "community-stats.md"
md_zh_path = script_dir / "docs" / "community-stats.zh.md"
md_zh_content = stats_client.generate_markdown(stats, lang="zh")
with open(md_zh_path, "w", encoding="utf-8") as f:
f.write(md_zh_content)
print(f"\n✅ 中文报告已保存到: {md_zh_path}")
# 英文报告
md_en_path = script_dir / "docs" / "community-stats.en.md"
md_en_path = script_dir / "docs" / "community-stats.md"
md_en_content = stats_client.generate_markdown(stats, lang="en")
with open(md_en_path, "w", encoding="utf-8") as f:
f.write(md_en_content)