chore(workflow): optimize release notes formatting and link visibility
- Removed redundant H1 title from automated release generation - Compacted README links in version change summary to same line - Streamlined release notes by removing verbose commit logs and redundant guides - Updated release-prep skill to enforce professional GitHub release standards
This commit is contained in:
55
.github/workflows/release.yml
vendored
55
.github/workflows/release.yml
vendored
@@ -436,54 +436,34 @@ jobs:
|
|||||||
CHANGED_PLUGIN_TITLE: ${{ needs.check-changes.outputs.changed_plugin_title }}
|
CHANGED_PLUGIN_TITLE: ${{ needs.check-changes.outputs.changed_plugin_title }}
|
||||||
CHANGED_PLUGIN_VERSION: ${{ needs.check-changes.outputs.changed_plugin_version }}
|
CHANGED_PLUGIN_VERSION: ${{ needs.check-changes.outputs.changed_plugin_version }}
|
||||||
DETECTED_CHANGES: ${{ needs.check-changes.outputs.release_notes }}
|
DETECTED_CHANGES: ${{ needs.check-changes.outputs.release_notes }}
|
||||||
COMMITS: ${{ steps.commits.outputs.commits }}
|
|
||||||
DOC_FILES: ${{ needs.check-changes.outputs.changed_doc_files }}
|
DOC_FILES: ${{ needs.check-changes.outputs.changed_doc_files }}
|
||||||
run: |
|
run: |
|
||||||
> release_notes.md
|
> release_notes.md
|
||||||
|
|
||||||
if [ -n "$CHANGED_PLUGIN_TITLE" ] && [ -n "$CHANGED_PLUGIN_VERSION" ]; then
|
# 1. Primary content from v*.md files (highest priority)
|
||||||
echo "# $CHANGED_PLUGIN_TITLE v$CHANGED_PLUGIN_VERSION" >> release_notes.md
|
|
||||||
echo "" >> release_notes.md
|
|
||||||
elif [ -n "$TITLE" ]; then
|
|
||||||
echo "# $TITLE" >> release_notes.md
|
|
||||||
echo "" >> release_notes.md
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 1. Release notes from v*.md files (highest priority, shown first)
|
|
||||||
if [ -n "$DOC_FILES" ]; then
|
if [ -n "$DOC_FILES" ]; then
|
||||||
RELEASE_NOTE_FILES=$(echo "$DOC_FILES" | grep -E '^plugins/.*/v[^/]*\.md$' | grep -v '_CN\.md$' || true)
|
RELEASE_NOTE_FILES=$(echo "$DOC_FILES" | grep -E '^plugins/.*/v[^/]*\.md$' | grep -v '_CN\.md$' || true)
|
||||||
if [ -n "$RELEASE_NOTE_FILES" ]; then
|
if [ -n "$RELEASE_NOTE_FILES" ]; then
|
||||||
while IFS= read -r file; do
|
while IFS= read -r file; do
|
||||||
[ -z "$file" ] && continue
|
[ -z "$file" ] && continue
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
python3 -c "import pathlib, re; file_path = pathlib.Path(r'''$file'''); text = file_path.read_text(encoding='utf-8'); text = re.sub(r'^#\\s+.+?(?:\\r?\\n)+', '', text, count=1, flags=re.MULTILINE); print(text.lstrip().rstrip())" >> release_notes.md
|
# Extract content, removing any H1 title from the file to avoid duplication
|
||||||
|
python3 -c "import pathlib, re; file_path = pathlib.Path(r'''$file'''); text = file_path.read_text(encoding='utf-8'); text = re.sub(r'^#\s+.+?(?:\r?\n)+', '', text, count=1, flags=re.MULTILINE); print(text.lstrip().rstrip())" >> release_notes.md
|
||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
fi
|
fi
|
||||||
done <<< "$RELEASE_NOTE_FILES"
|
done <<< "$RELEASE_NOTE_FILES"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. Plugin version changes detected by script
|
# 2. Automated plugin version change summary
|
||||||
if [ -z "$CHANGED_PLUGIN_TITLE" ] && [ -z "$CHANGED_PLUGIN_VERSION" ] && [ -n "$TITLE" ]; then
|
|
||||||
echo "## $TITLE" >> release_notes.md
|
|
||||||
echo "" >> release_notes.md
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$DETECTED_CHANGES" ] && ! echo "$DETECTED_CHANGES" | grep -q "No changes detected"; then
|
if [ -n "$DETECTED_CHANGES" ] && ! echo "$DETECTED_CHANGES" | grep -q "No changes detected"; then
|
||||||
echo "## What's Changed" >> release_notes.md
|
echo "## Version Changes" >> release_notes.md
|
||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
echo "$DETECTED_CHANGES" >> release_notes.md
|
echo "$DETECTED_CHANGES" >> release_notes.md
|
||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 3. Commits (Conventional Commits format with body)
|
# 3. Manual additional notes from workflow dispatch
|
||||||
if [ -n "$COMMITS" ]; then
|
|
||||||
echo "## Commits" >> release_notes.md
|
|
||||||
echo "" >> release_notes.md
|
|
||||||
echo "$COMMITS" >> release_notes.md
|
|
||||||
echo "" >> release_notes.md
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$NOTES" ]; then
|
if [ -n "$NOTES" ]; then
|
||||||
echo "## Additional Notes" >> release_notes.md
|
echo "## Additional Notes" >> release_notes.md
|
||||||
echo "" >> release_notes.md
|
echo "" >> release_notes.md
|
||||||
@@ -493,30 +473,15 @@ jobs:
|
|||||||
|
|
||||||
cat >> release_notes.md << 'EOF'
|
cat >> release_notes.md << 'EOF'
|
||||||
|
|
||||||
## Download
|
|
||||||
|
|
||||||
📦 **Download the updated plugin files below**
|
|
||||||
|
|
||||||
### Installation
|
|
||||||
|
|
||||||
#### From OpenWebUI Community
|
|
||||||
1. Open OpenWebUI Admin Panel
|
|
||||||
2. Navigate to Functions/Tools
|
|
||||||
3. Search for the plugin name
|
|
||||||
4. Click Install
|
|
||||||
|
|
||||||
#### Manual Installation
|
|
||||||
1. Download the plugin file (`.py`) from the assets below
|
|
||||||
2. Open OpenWebUI Admin Panel → Functions
|
|
||||||
3. Click "Create Function" → Import
|
|
||||||
4. Paste the plugin code
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
📚 [Documentation](https://fu-jie.github.io/openwebui-extensions/)
|
📚 [Documentation Portal](https://fu-jie.github.io/openwebui-extensions/)
|
||||||
🐛 [Report Issues](https://github.com/Fu-Jie/openwebui-extensions/issues)
|
🐛 [Report Issues](https://github.com/Fu-Jie/openwebui-extensions/issues)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
echo "=== Final Release Notes ==="
|
||||||
|
cat release_notes.md
|
||||||
|
|
||||||
echo "=== Release Notes ==="
|
echo "=== Release Notes ==="
|
||||||
cat release_notes.md
|
cat release_notes.md
|
||||||
|
|
||||||
|
|||||||
@@ -285,9 +285,8 @@ def format_release_notes(
|
|||||||
prev_ver = prev_manifest.get("version") or prev.get("version")
|
prev_ver = prev_manifest.get("version") or prev.get("version")
|
||||||
|
|
||||||
readme_url = _get_readme_url(curr.get("file_path", ""))
|
readme_url = _get_readme_url(curr.get("file_path", ""))
|
||||||
lines.append(f"- **{curr_title}**: v{prev_ver} → v{curr_ver}")
|
readme_link = f" | [📖 README]({readme_url})" if readme_url else ""
|
||||||
if readme_url:
|
lines.append(f"- **{curr_title}**: v{prev_ver} → v{curr_ver}{readme_link}")
|
||||||
lines.append(f" - 📖 [README]({readme_url})")
|
|
||||||
lines.append("")
|
lines.append("")
|
||||||
|
|
||||||
if comparison["removed"] and not ignore_removed:
|
if comparison["removed"] and not ignore_removed:
|
||||||
|
|||||||
Reference in New Issue
Block a user