Skip to content

Commit 5322930

Browse files
authored
Merge pull request #13 from itk-dev/feature/auto-release-workflow
feat: add auto-release workflow for MCP dependency updates
2 parents 1e1f857 + 8899162 commit 5322930

5 files changed

Lines changed: 249 additions & 1 deletion

File tree

.claude-plugin/mcp-versions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"mcp-claude-code-browser-feedback": "v0.3.1",
3+
"mcp-itkdev-docker": "none"
4+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Check MCP Updates
2+
3+
on:
4+
schedule:
5+
- cron: '30 8 * * *' # Daily at 8:30 UTC
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
check-updates:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
has_updates: ${{ steps.check.outputs.has_updates }}
13+
updates_summary: ${{ steps.check.outputs.summary }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Check for MCP updates
18+
id: check
19+
env:
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
run: |
22+
set -e
23+
24+
# Read current tracked versions
25+
TRACKED_VERSIONS=".claude-plugin/mcp-versions.json"
26+
27+
# Get latest release for mcp-claude-code-browser-feedback
28+
BROWSER_FEEDBACK_LATEST=$(gh api repos/itk-dev/mcp-claude-code-browser-feedback/releases/latest --jq '.tag_name' 2>/dev/null || echo "none")
29+
BROWSER_FEEDBACK_TRACKED=$(jq -r '.["mcp-claude-code-browser-feedback"]' "$TRACKED_VERSIONS")
30+
31+
# Get latest release for mcp-itkdev-docker
32+
DOCKER_LATEST=$(gh api repos/itk-dev/mcp-itkdev-docker/releases/latest --jq '.tag_name' 2>/dev/null || echo "none")
33+
DOCKER_TRACKED=$(jq -r '.["mcp-itkdev-docker"]' "$TRACKED_VERSIONS")
34+
35+
echo "Browser Feedback: tracked=$BROWSER_FEEDBACK_TRACKED, latest=$BROWSER_FEEDBACK_LATEST"
36+
echo "Docker: tracked=$DOCKER_TRACKED, latest=$DOCKER_LATEST"
37+
38+
# Check for updates
39+
HAS_UPDATES="false"
40+
SUMMARY=""
41+
42+
if [ "$BROWSER_FEEDBACK_LATEST" != "none" ] && [ "$BROWSER_FEEDBACK_LATEST" != "$BROWSER_FEEDBACK_TRACKED" ]; then
43+
HAS_UPDATES="true"
44+
SUMMARY="mcp-claude-code-browser-feedback: $BROWSER_FEEDBACK_TRACKED -> $BROWSER_FEEDBACK_LATEST"
45+
fi
46+
47+
if [ "$DOCKER_LATEST" != "none" ] && [ "$DOCKER_LATEST" != "$DOCKER_TRACKED" ]; then
48+
HAS_UPDATES="true"
49+
if [ -n "$SUMMARY" ]; then
50+
SUMMARY="$SUMMARY, "
51+
fi
52+
SUMMARY="${SUMMARY}mcp-itkdev-docker: $DOCKER_TRACKED -> $DOCKER_LATEST"
53+
fi
54+
55+
echo "has_updates=$HAS_UPDATES" >> "$GITHUB_OUTPUT"
56+
echo "summary=$SUMMARY" >> "$GITHUB_OUTPUT"
57+
echo "browser_feedback_latest=$BROWSER_FEEDBACK_LATEST" >> "$GITHUB_OUTPUT"
58+
echo "docker_latest=$DOCKER_LATEST" >> "$GITHUB_OUTPUT"
59+
60+
echo "Has updates: $HAS_UPDATES"
61+
echo "Summary: $SUMMARY"
62+
63+
- name: Trigger release
64+
if: steps.check.outputs.has_updates == 'true'
65+
env:
66+
SUMMARY: ${{ steps.check.outputs.summary }}
67+
BROWSER_FEEDBACK_LATEST: ${{ steps.check.outputs.browser_feedback_latest }}
68+
DOCKER_LATEST: ${{ steps.check.outputs.docker_latest }}
69+
uses: actions/github-script@v7
70+
with:
71+
script: |
72+
await github.rest.actions.createWorkflowDispatch({
73+
owner: context.repo.owner,
74+
repo: context.repo.repo,
75+
workflow_id: 'release.yml',
76+
ref: 'main',
77+
inputs: {
78+
updates_summary: process.env.SUMMARY,
79+
browser_feedback_version: process.env.BROWSER_FEEDBACK_LATEST,
80+
docker_version: process.env.DOCKER_LATEST
81+
}
82+
})

.github/workflows/release.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
updates_summary:
7+
description: 'Summary of MCP updates'
8+
required: false
9+
type: string
10+
browser_feedback_version:
11+
description: 'New version of mcp-claude-code-browser-feedback'
12+
required: false
13+
type: string
14+
docker_version:
15+
description: 'New version of mcp-itkdev-docker'
16+
required: false
17+
type: string
18+
19+
jobs:
20+
release:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Configure Git
30+
run: |
31+
git config user.name "github-actions[bot]"
32+
git config user.email "github-actions[bot]@users.noreply.github.com"
33+
34+
- name: Update versions and create release
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
UPDATES_SUMMARY: ${{ inputs.updates_summary }}
38+
BROWSER_FEEDBACK_VERSION: ${{ inputs.browser_feedback_version }}
39+
DOCKER_VERSION: ${{ inputs.docker_version }}
40+
run: |
41+
set -e
42+
43+
PLUGIN_JSON=".claude-plugin/plugin.json"
44+
MCP_VERSIONS=".claude-plugin/mcp-versions.json"
45+
46+
# Get current version and bump patch
47+
CURRENT_VERSION=$(jq -r '.version' "$PLUGIN_JSON")
48+
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
49+
NEW_PATCH=$((PATCH + 1))
50+
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
51+
52+
echo "Bumping version: $CURRENT_VERSION -> $NEW_VERSION"
53+
54+
# Update plugin.json version
55+
jq --arg v "$NEW_VERSION" '.version = $v' "$PLUGIN_JSON" > tmp.json && mv tmp.json "$PLUGIN_JSON"
56+
57+
# Update mcp-versions.json with new tracked versions
58+
if [ -n "$BROWSER_FEEDBACK_VERSION" ] && [ "$BROWSER_FEEDBACK_VERSION" != "none" ]; then
59+
jq --arg v "$BROWSER_FEEDBACK_VERSION" '.["mcp-claude-code-browser-feedback"] = $v' "$MCP_VERSIONS" > tmp.json && mv tmp.json "$MCP_VERSIONS"
60+
fi
61+
62+
if [ -n "$DOCKER_VERSION" ] && [ "$DOCKER_VERSION" != "none" ]; then
63+
jq --arg v "$DOCKER_VERSION" '.["mcp-itkdev-docker"] = $v' "$MCP_VERSIONS" > tmp.json && mv tmp.json "$MCP_VERSIONS"
64+
fi
65+
66+
# Commit changes
67+
git add "$PLUGIN_JSON" "$MCP_VERSIONS"
68+
git commit -m "chore: bump version to $NEW_VERSION
69+
70+
MCP dependency updates:
71+
$UPDATES_SUMMARY"
72+
73+
# Create and push tag
74+
TAG="v$NEW_VERSION"
75+
git tag -a "$TAG" -m "Release $TAG"
76+
git push origin main
77+
git push origin "$TAG"
78+
79+
# Create GitHub release
80+
RELEASE_NOTES="## What's Changed
81+
82+
This release updates MCP server dependencies:
83+
84+
$UPDATES_SUMMARY
85+
86+
## MCP Versions
87+
- mcp-claude-code-browser-feedback: $(jq -r '.["mcp-claude-code-browser-feedback"]' "$MCP_VERSIONS")
88+
- mcp-itkdev-docker: $(jq -r '.["mcp-itkdev-docker"]' "$MCP_VERSIONS")"
89+
90+
gh release create "$TAG" \
91+
--title "Release $TAG" \
92+
--notes "$RELEASE_NOTES"
93+
94+
echo "Released version $NEW_VERSION"

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Auto-release workflow for MCP dependency updates
13+
- Daily scheduled check for new MCP releases (8:30 UTC)
14+
- Automated version bump and release creation when updates detected
15+
- Version tracking in `.claude-plugin/mcp-versions.json`
16+
17+
## [0.2.0] - 2025-01-24
18+
19+
### Added
20+
21+
- User-invocable skills for common workflows
22+
- `/itkdev-commit` - Create commits following ITK Dev guidelines
23+
- `/itkdev-pr` - Create pull requests with proper formatting
24+
- `/itkdev-changelog` - Update changelog entries
25+
26+
### Changed
27+
28+
- Renamed skills to use `itkdev` prefix for consistency
29+
30+
## [0.1.0] - 2025-01-23
31+
32+
### Added
33+
34+
- Initial plugin release
35+
- Browser feedback MCP server integration
36+
- GitHub guidelines skill for ITK Dev team workflows
37+
- Plugin marketplace structure
38+
39+
[Unreleased]: https://github.com/itk-dev/itkdev-claude-plugins/compare/v0.2.0...HEAD
40+
[0.2.0]: https://github.com/itk-dev/itkdev-claude-plugins/compare/v0.1.0...v0.2.0
41+
[0.1.0]: https://github.com/itk-dev/itkdev-claude-plugins/releases/tag/v0.1.0

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ A Claude Code plugin marketplace for ITK Dev team tools and MCP servers.
88
itkdev-claude-plugins/
99
├── .claude-plugin/
1010
│ ├── plugin.json # Plugin manifest
11-
│ └── marketplace.json # Marketplace catalog
11+
│ ├── marketplace.json # Marketplace catalog
12+
│ └── mcp-versions.json # Tracked MCP dependency versions
13+
├── .github/workflows/ # GitHub Actions workflows
14+
│ ├── check-mcp-updates.yml # Weekly MCP update checker
15+
│ └── release.yml # Automated release workflow
1216
├── .mcp.json # MCP server configurations
1317
├── commands/ # Slash commands (Markdown files)
1418
│ └── example.md
@@ -45,6 +49,29 @@ GitHub workflow guidelines for the ITK Dev team. Automatically activates when wo
4549
- Changelog updates (Keep a Changelog format)
4650
- PR requirements and templates
4751

52+
## Auto-Release Workflow
53+
54+
This plugin automatically releases new versions when MCP server dependencies publish updates.
55+
56+
### How it works
57+
58+
1. **Daily Check**: A GitHub Actions workflow runs every day at 8:30 UTC
59+
2. **Version Comparison**: Compares latest MCP releases with tracked versions in `.claude-plugin/mcp-versions.json`
60+
3. **Automated Release**: If updates are detected, a new patch version is released automatically
61+
62+
### Tracked Dependencies
63+
64+
| MCP Server | Repository |
65+
|------------|------------|
66+
| browser-feedback | [mcp-claude-code-browser-feedback](https://github.com/itk-dev/mcp-claude-code-browser-feedback) |
67+
| docker | [mcp-itkdev-docker](https://github.com/itk-dev/mcp-itkdev-docker) |
68+
69+
### Manual Trigger
70+
71+
You can manually trigger a dependency check via the GitHub Actions UI:
72+
1. Go to **Actions** > **Check MCP Updates**
73+
2. Click **Run workflow**
74+
4875
## Adding New Tools
4976

5077
### Adding MCP Servers

0 commit comments

Comments
 (0)