-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (71 loc) · 2.81 KB
/
Copy pathrelease.yml
File metadata and controls
82 lines (71 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Release
on:
push:
tags:
- 'v*'
jobs:
pre-release-checks:
name: Pre-Release Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Hook lint
run: |
for hook in hooks/*.sh; do
[ -x "$hook" ] || { echo "$hook not executable"; exit 1; }
SHEBANG=$(head -1 "$hook")
[[ "$SHEBANG" == "#!/bin/bash" ]] || { echo "$hook bad shebang"; exit 1; }
done
- name: JSON manifests parse
run: |
python3 -m json.tool .claude-plugin/plugin.json > /dev/null
python3 -m json.tool .claude-plugin/marketplace.json > /dev/null
python3 -m json.tool gemini-extension.json > /dev/null
- name: Distribution channel manifests present
run: |
set -e
for f in .claude-plugin/plugin.json .claude-plugin/marketplace.json \
.codex-plugin/plugin.json gemini-extension.json .clawhubignore; do
test -f "$f" || { echo "MISSING: $f"; exit 1; }
done
echo "All channel manifests present"
- name: Version tag matches SKILL.md
run: |
TAG="${GITHUB_REF#refs/tags/v}"
SKILL_VER=$(grep '^version:' SKILL.md | head -1 | sed 's/version: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/')
[ "$TAG" = "$SKILL_VER" ] || { echo "Tag v$TAG != SKILL.md $SKILL_VER"; exit 1; }
- name: CHANGELOG has entry for version
run: |
TAG="${GITHUB_REF#refs/tags/v}"
grep -q "\[$TAG\]" CHANGELOG.md || { echo "No CHANGELOG entry for $TAG"; exit 1; }
create-release:
name: Create GitHub Release
needs: pre-release-checks
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Extract release notes
id: notes
run: |
TAG="${GITHUB_REF#refs/tags/v}"
# Extract section between this version header and the next version header (or EOF)
NOTES=$(awk "/^## \[$TAG\]/{found=1; next} /^## \[/{if(found) exit} found{print}" CHANGELOG.md)
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
echo "$NOTES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.notes.outputs.notes }}
generate_release_notes: false
- name: Dispatch to aggregate registry
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/maxtechera/claude-plugins/dispatches \
-f event_type=skill-released \
-f "client_payload[skill]=${{ github.event.repository.name }}" \
-f "client_payload[version]=${{ github.ref_name }}" \
2>/dev/null || echo "Aggregate registry dispatch skipped (not configured)"