Skip to content

Commit 8594b11

Browse files
orioltfclaude
andcommitted
chore(spec-10): add release workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 86ae02f commit 8594b11

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
tag:
9+
name: Tag released plugins
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 2 # need HEAD and HEAD~1 to diff
17+
18+
- name: Detect version changes and tag
19+
env:
20+
SIGN_TAGS: ${{ secrets.UNIC_SIGN_TAGS }}
21+
run: |
22+
tag_if_changed() {
23+
local plugin_dir="$1"
24+
local json_path="$plugin_dir/.claude-plugin/plugin.json"
25+
26+
if [ ! -f "$json_path" ]; then return; fi
27+
28+
current=$(node -p "JSON.parse(require('fs').readFileSync('$json_path','utf8')).version")
29+
previous=$(git show HEAD~1:"$json_path" 2>/dev/null \
30+
| node -p "JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')).version" \
31+
|| echo "")
32+
33+
if [ "$current" = "$previous" ]; then return; fi
34+
35+
name=$(node -p "JSON.parse(require('fs').readFileSync('$json_path','utf8')).name")
36+
tag="${name}@${current}"
37+
38+
echo "Tagging $tag"
39+
if [ "$SIGN_TAGS" = "true" ]; then
40+
git tag -s "$tag" -m "Release $tag"
41+
else
42+
git tag "$tag"
43+
fi
44+
git push origin "$tag"
45+
}
46+
47+
tag_if_changed "apps/claude-code/pr-review"
48+
tag_if_changed "apps/claude-code/auto-format"
49+
tag_if_changed "apps/claude-code/confluence-publish"

docs/plans/10-release-workflow.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 10. Release Workflow
2+
**Status: done — 2026-04-29**
23

34
**Priority:** P0
45
**Effort:** M

0 commit comments

Comments
 (0)