-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 1.28 KB
/
Copy pathrelease.yml
File metadata and controls
42 lines (36 loc) · 1.28 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
# Create a GitHub Release (with auto-generated notes) when a version tag is
# pushed. This plugin is installed via the Claude Code marketplace (a git repo),
# not npm, so there is NO npm publish step — the Release is the versioning
# artifact for marketplace users.
#
# Usage: bump .claude-plugin/plugin.json "version", commit, then:
# git tag vX.Y.Z && git push origin vX.Y.Z
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write # needed to create the Release
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
# Refuse if the tag and plugin.json version disagree (fail-fast).
- name: Verify tag matches plugin.json version
run: |
PKG_VERSION=$(jq -r .version .claude-plugin/plugin.json)
TAG_VERSION="${GITHUB_REF_NAME#v}"
echo "plugin.json: $PKG_VERSION"
echo "release tag: $TAG_VERSION"
if [ "$PKG_VERSION" != "$TAG_VERSION" ]; then
echo "::error::Tag '$TAG_VERSION' does not match plugin.json '$PKG_VERSION'. Bump plugin.json or retag."
exit 1
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true