Skip to content

docs: add update and release guidance #1

docs: add update and release guidance

docs: add update and release guidance #1

Workflow file for this run

name: Release
on:
pull_request:
push:
branches:
- main
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate plugin metadata JSON
run: |
jq empty .claude-plugin/plugin.json
jq empty .claude-plugin/marketplace.json
- name: Check plugin and marketplace versions match
run: |
plugin_version="$(jq -r '.version' .claude-plugin/plugin.json)"
marketplace_version="$(jq -r '.plugins[] | select(.name == "pr-review") | .version' .claude-plugin/marketplace.json)"
test "$plugin_version" = "$marketplace_version"
- name: Validate changelog has current version section
run: |
plugin_version="$(jq -r '.version' .claude-plugin/plugin.json)"
grep -q "^## \\[$plugin_version\\]" CHANGELOG.md
- name: Validate review scripts
run: bash -n skills/pr-review/scripts/*.sh
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: validate
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Verify tag matches plugin version
run: |
tag="${GITHUB_REF_NAME#v}"
plugin_version="$(jq -r '.version' .claude-plugin/plugin.json)"
test "$tag" = "$plugin_version"
- name: Extract release notes from changelog
run: |
tag="${GITHUB_REF_NAME#v}"
awk -v ver="$tag" '
$0 ~ "^## \\[" ver "\\]" {flag=1; next}
flag && $0 ~ "^## \\[" {exit}
flag {print}
' CHANGELOG.md | sed '/^[[:space:]]*$/N;/^\n$/D' > RELEASE_NOTES.md
test -s RELEASE_NOTES.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: RELEASE_NOTES.md