diff --git a/.github/workflows/community-stats.yml b/.github/workflows/community-stats.yml index 69e7727..c898298 100644 --- a/.github/workflows/community-stats.yml +++ b/.github/workflows/community-stats.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e107c2b..e449579 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/README.md b/README.md index 88fa988..133e5f6 100644 --- a/README.md +++ b/README.md @@ -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 | |:---:|------|:---:|:---:| diff --git a/README_CN.md b/README_CN.md index 985c6ea..1834d9b 100644 --- a/README_CN.md +++ b/README_CN.md @@ -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)* ## šŸ“¦ 锹目内容 diff --git a/docs/community-stats.md b/docs/community-stats.md index 2fd5f54..fa78ebd 100644 --- a/docs/community-stats.md +++ b/docs/community-stats.md @@ -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 | diff --git a/docs/community-stats.en.md b/docs/community-stats.zh.md similarity index 81% rename from docs/community-stats.en.md rename to docs/community-stats.zh.md index fa78ebd..2fd5f54 100644 --- a/docs/community-stats.en.md +++ b/docs/community-stats.zh.md @@ -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 | diff --git a/scripts/openwebui_stats.py b/scripts/openwebui_stats.py index 0d244ec..1a22df7 100644 --- a/scripts/openwebui_stats.py +++ b/scripts/openwebui_stats.py @@ -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)