-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.37 KB
/
release-plugin.yml
File metadata and controls
53 lines (42 loc) · 1.37 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
name: Release Claude Plugin
on:
pull_request_target:
types: [closed]
branches: [main]
permissions:
contents: write
concurrency:
group: clone-plugin-release-main
cancel-in-progress: false
jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Check out main
uses: actions/checkout@v5
with:
ref: main
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: 24
- name: Bump patch version
run: node scripts/bump-plugin-version.mjs --part patch
- name: Test release candidate
run: npm test
- name: Commit and tag release
run: |
VERSION="$(node -p "JSON.parse(require('fs').readFileSync('.claude-plugin/plugin.json', 'utf8')).version")"
TAG="clone--v${VERSION}"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists"
exit 1
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .claude-plugin/plugin.json .codex-plugin/plugin.json README.md
git commit -m "chore: release ${TAG}"
git tag -a "$TAG" -m "clone ${VERSION}"
git push origin HEAD:main "$TAG"