Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/update-version-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Update Marketplace Version on Release

on:
release:
types: [published]

jobs:
update-version:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract version from release tag
id: version
env:
TAG: ${{ github.event.release.tag_name }}
run: |
# Strip leading 'v' prefix if present (e.g. v1.2.3 → 1.2.3)
VERSION="${TAG#v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"

- name: Update .claude-plugin/marketplace.json
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
jq --arg v "$VERSION" \
'.plugins = [.plugins[] | . + {version: $v}]' \
.claude-plugin/marketplace.json > /tmp/claude-marketplace.json
mv /tmp/claude-marketplace.json .claude-plugin/marketplace.json

- name: Update .cursor-plugin/marketplace.json
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
jq --arg v "$VERSION" \
'.plugins = [.plugins[] | . + {version: $v}]' \
.cursor-plugin/marketplace.json > /tmp/cursor-marketplace.json
mv /tmp/cursor-marketplace.json .cursor-plugin/marketplace.json

- name: Commit and push version bump
env:
TAG: ${{ steps.version.outputs.tag }}
TARGET_COMMITISH: ${{ github.event.release.target_commitish }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .claude-plugin/marketplace.json .cursor-plugin/marketplace.json
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "chore: bump marketplace version to $TAG"
git push origin "HEAD:$TARGET_COMMITISH"
Loading