Skip to content

ci: add sync-plugin-version workflow#28

Merged
intel352 merged 1 commit into
mainfrom
chore/install-version-sync-workflow
May 14, 2026
Merged

ci: add sync-plugin-version workflow#28
intel352 merged 1 commit into
mainfrom
chore/install-version-sync-workflow

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Installs .github/workflows/sync-plugin-version.yml which auto-bumps plugin.json version to match the git tag on every v* tag push. Prevents plugin.json/tag drift. Closes GoCodeAlone/workflow-registry#37.

Copilot AI review requested due to automatic review settings May 14, 2026 02:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions workflow that, on every v* tag push, checks out main, rewrites plugin.json's version field to match the tag, and opens a PR if there is drift. Intended to keep plugin.json aligned with release tags and close workflow-registry#37.

Changes:

  • New sync-plugin-version.yml workflow triggered by v* tag pushes.
  • Computes version from GITHUB_REF_NAME and rewrites plugin.json via inline Python.
  • Commits the change to a per-tag branch and opens a PR via gh using GITHUB_TOKEN.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +53 to +59
gh pr create \
--base main \
--head "$BRANCH" \
--title "chore: sync plugin.json version to ${{ steps.ver.outputs.tag }}" \
--body "Triggered by release ${{ steps.ver.outputs.tag }}. Auto-sync to prevent drift. Closes workflow-registry#37."
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +46 to +57
BRANCH="chore/sync-plugin-version-${{ steps.ver.outputs.tag }}"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git checkout -b "$BRANCH"
git add plugin.json
git commit -m "chore: sync plugin.json version to ${{ steps.ver.outputs.tag }}"
git push origin "$BRANCH"
gh pr create \
--base main \
--head "$BRANCH" \
--title "chore: sync plugin.json version to ${{ steps.ver.outputs.tag }}" \
--body "Triggered by release ${{ steps.ver.outputs.tag }}. Auto-sync to prevent drift. Closes workflow-registry#37."
Comment on lines +33 to +36
python3 -c "
import json
p = json.load(open('plugin.json'))
p['version'] = '$TARGET'
tags: ['v*']
permissions:
contents: write
pull-requests: write
Comment on lines +33 to +39
python3 -c "
import json
p = json.load(open('plugin.json'))
p['version'] = '$TARGET'
json.dump(p, open('plugin.json', 'w'), indent=2)
open('plugin.json', 'a').write('\n')
"
Comment on lines +12 to +16
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
@intel352 intel352 merged commit 5e37873 into main May 14, 2026
13 checks passed
@intel352 intel352 deleted the chore/install-version-sync-workflow branch May 14, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add release-automation to keep plugin.json + registry manifests in sync with git tags

2 participants