ci(release): optimize plugin release workflow
- detect both version changes and plugin/docs release-note updates - broaden push path filters and include documentation change summary in release notes - harden worktree temp handling, remove duplicate extraction, and skip tag creation on tag-triggered runs
This commit is contained in:
44
.github/workflows/release.yml
vendored
44
.github/workflows/release.yml
vendored
@@ -22,6 +22,11 @@ on:
|
|||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'plugins/**/*.py'
|
- 'plugins/**/*.py'
|
||||||
|
- 'plugins/**/README.md'
|
||||||
|
- 'plugins/**/README_CN.md'
|
||||||
|
- 'plugins/**/v*.md'
|
||||||
|
- 'plugins/**/v*_CN.md'
|
||||||
|
- 'docs/plugins/**/*.md'
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
@@ -59,6 +64,7 @@ jobs:
|
|||||||
has_changes: ${{ steps.detect.outputs.has_changes }}
|
has_changes: ${{ steps.detect.outputs.has_changes }}
|
||||||
changed_plugins: ${{ steps.detect.outputs.changed_plugins }}
|
changed_plugins: ${{ steps.detect.outputs.changed_plugins }}
|
||||||
release_notes: ${{ steps.detect.outputs.release_notes }}
|
release_notes: ${{ steps.detect.outputs.release_notes }}
|
||||||
|
has_doc_changes: ${{ steps.detect.outputs.has_doc_changes }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -95,17 +101,19 @@ jobs:
|
|||||||
python scripts/extract_plugin_versions.py --json --output current_versions.json
|
python scripts/extract_plugin_versions.py --json --output current_versions.json
|
||||||
|
|
||||||
# Get previous plugin versions by checking out old plugins
|
# Get previous plugin versions by checking out old plugins
|
||||||
if git worktree add /tmp/old_repo ${COMPARE_REF} 2>/dev/null; then
|
OLD_WORKTREE=$(mktemp -d)
|
||||||
if [ -d /tmp/old_repo/plugins ]; then
|
if git worktree add "$OLD_WORKTREE" ${COMPARE_REF} 2>/dev/null; then
|
||||||
python scripts/extract_plugin_versions.py --plugins-dir /tmp/old_repo/plugins --json --output old_versions.json
|
if [ -d "$OLD_WORKTREE/plugins" ]; then
|
||||||
|
python scripts/extract_plugin_versions.py --plugins-dir "$OLD_WORKTREE/plugins" --json --output old_versions.json
|
||||||
else
|
else
|
||||||
echo "[]" > old_versions.json
|
echo "[]" > old_versions.json
|
||||||
fi
|
fi
|
||||||
git worktree remove /tmp/old_repo 2>/dev/null || true
|
git worktree remove "$OLD_WORKTREE" 2>/dev/null || true
|
||||||
else
|
else
|
||||||
echo "Failed to create worktree, using empty version list"
|
echo "Failed to create worktree, using empty version list"
|
||||||
echo "[]" > old_versions.json
|
echo "[]" > old_versions.json
|
||||||
fi
|
fi
|
||||||
|
rm -rf "$OLD_WORKTREE" 2>/dev/null || true
|
||||||
|
|
||||||
# Compare versions and generate release notes
|
# Compare versions and generate release notes
|
||||||
python scripts/extract_plugin_versions.py --compare old_versions.json --ignore-removed --output changes.md
|
python scripts/extract_plugin_versions.py --compare old_versions.json --ignore-removed --output changes.md
|
||||||
@@ -113,10 +121,28 @@ jobs:
|
|||||||
|
|
||||||
echo "=== Version Changes ==="
|
echo "=== Version Changes ==="
|
||||||
cat changes.md
|
cat changes.md
|
||||||
|
|
||||||
|
# Detect documentation/release-note changes that should be reflected in release notes
|
||||||
|
git diff --name-only "$COMPARE_REF"..HEAD -- \
|
||||||
|
'plugins/**/README.md' \
|
||||||
|
'plugins/**/README_CN.md' \
|
||||||
|
'plugins/**/v*.md' \
|
||||||
|
'plugins/**/v*_CN.md' \
|
||||||
|
'docs/plugins/**/*.md' > changed_docs.txt || true
|
||||||
|
|
||||||
|
if [ -s changed_docs.txt ]; then
|
||||||
|
echo "has_doc_changes=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "has_doc_changes=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
# Check if there are any changes
|
# Check if there are any changes
|
||||||
if grep -q "No changes detected" changes.md; then
|
if grep -q "No changes detected" changes.md; then
|
||||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
if [ -s changed_docs.txt ]; then
|
||||||
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
echo "changed_plugins=" >> $GITHUB_OUTPUT
|
echo "changed_plugins=" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||||
@@ -146,6 +172,12 @@ jobs:
|
|||||||
{
|
{
|
||||||
echo 'release_notes<<EOF'
|
echo 'release_notes<<EOF'
|
||||||
cat changes.md
|
cat changes.md
|
||||||
|
if [ -s changed_docs.txt ]; then
|
||||||
|
echo ""
|
||||||
|
echo "## Documentation Changes"
|
||||||
|
echo ""
|
||||||
|
sed 's/^/- /' changed_docs.txt
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo 'EOF'
|
echo 'EOF'
|
||||||
} >> $GITHUB_OUTPUT
|
} >> $GITHUB_OUTPUT
|
||||||
@@ -214,7 +246,6 @@ jobs:
|
|||||||
id: plugins
|
id: plugins
|
||||||
run: |
|
run: |
|
||||||
python scripts/extract_plugin_versions.py --json --output plugin_versions.json
|
python scripts/extract_plugin_versions.py --json --output plugin_versions.json
|
||||||
python scripts/extract_plugin_versions.py --json --output plugin_versions.json
|
|
||||||
|
|
||||||
- name: Collect plugin files for release
|
- name: Collect plugin files for release
|
||||||
id: collect_files
|
id: collect_files
|
||||||
@@ -389,6 +420,7 @@ jobs:
|
|||||||
cat release_notes.md
|
cat release_notes.md
|
||||||
|
|
||||||
- name: Create Git Tag
|
- name: Create Git Tag
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ steps.version.outputs.version }}"
|
VERSION="${{ steps.version.outputs.version }}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# v0.9.1 Release Notes
|
# GitHub Copilot SDK Pipe v0.9.1 Release Notes
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This release upgrades the GitHub Copilot SDK Pipe into a more autonomous and ecosystem-aware Agent integration for OpenWebUI, with stronger web-search behavior, clearer terminology, and improved tool-filtering reliability.
|
This release upgrades the GitHub Copilot SDK Pipe into a more autonomous and ecosystem-aware Agent integration for OpenWebUI, with stronger web-search behavior, clearer terminology, and improved tool-filtering reliability.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# v0.9.1 版本发布说明
|
# GitHub Copilot SDK Pipe v0.9.1 发布说明
|
||||||
|
|
||||||
## 概览
|
## 概览
|
||||||
本次版本将 GitHub Copilot SDK Pipe 升级为更自主、与 OpenWebUI 生态深度融合的 Agent 集成方案,重点强化了网页搜索行为、术语一致性与工具过滤稳定性。
|
本次版本将 GitHub Copilot SDK Pipe 升级为更自主、与 OpenWebUI 生态深度融合的 Agent 集成方案,重点强化了网页搜索行为、术语一致性与工具过滤稳定性。
|
||||||
|
|||||||
Reference in New Issue
Block a user