From e26a736cf7e79e9157e3d73a3b615321601a1b12 Mon Sep 17 00:00:00 2001 From: Mahipal <42860185+mukul975@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:46:36 +0200 Subject: [PATCH] ci: add workflow to auto-sync marketplace version on release --- .../workflows/sync-marketplace-version.yml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/sync-marketplace-version.yml diff --git a/.github/workflows/sync-marketplace-version.yml b/.github/workflows/sync-marketplace-version.yml new file mode 100644 index 00000000..db53f8e7 --- /dev/null +++ b/.github/workflows/sync-marketplace-version.yml @@ -0,0 +1,41 @@ +name: Sync Marketplace Version on Release + +on: + release: + types: [published] + +jobs: + sync-version: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract version from tag + id: version + run: | + VERSION=${GITHUB_REF_NAME#v} + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "tag=$GITHUB_REF_NAME" >> $GITHUB_OUTPUT + + - name: Update marketplace.json version + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + jq --arg v "$VERSION" + '.metadata.version = $v | .plugins[].version = $v' + .claude-plugin/marketplace.json > tmp.json + mv tmp.json .claude-plugin/marketplace.json + echo "Updated marketplace.json to version $VERSION" + + - name: Commit and push + run: | + git config user.name "mukul975" + git config user.email "mukuljangra5@gmail.com" + git add .claude-plugin/marketplace.json + git diff --staged --quiet || git commit -m "chore: bump marketplace version to ${{ steps.version.outputs.tag }}" + git push