Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"name": "dotnetbrowser",
"source": "./",
"description": "Official TeamDev skill for DotNetBrowser 4.3.3, the Chromium-based browser component for .NET (WPF, Windows Forms, WinUI 3, Avalonia UI, console). Coding guidance, full API reference, and offline docs, release notes, and migration guides.",
"version": "4.3.3",
"author": {
"name": "TeamDev"
},
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Check

on:
push:
branches: [main]
tags: ["v*"]
pull_request:

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- name: Validate the plugin and marketplace
run: |
npm install --global @anthropic-ai/claude-code
claude plugin validate .

- name: Check directory limits
run: |
status=0

# Every non-image file must stay under 256 KiB.
large=$(git ls-files -z \
| grep -zviE '\.(png|jpe?g|gif|webp|svg|ico)$' \
| xargs -0 stat -c '%s %n' \
| awk '$1 >= 262144')
if [ -n "$large" ]; then
echo "::error::Files of 256 KiB or more:"; echo "$large"; status=1
fi

forbidden=$(git ls-files \
| grep -E '(^|/)(\.DS_Store|Thumbs\.db|desktop\.ini|__MACOSX)(/|$)' || true)
if [ -n "$forbidden" ]; then
echo "::error::Files the directory rejects:"; echo "$forbidden"; status=1
fi

links=$(git ls-files -s | awk '$1 == "120000" { print $4 }')
if [ -n "$links" ]; then
echo "::error::Symbolic links:"; echo "$links"; status=1
fi

if git ls-files -z | xargs -0 git check-attr filter export-ignore -- \
| grep -vE ': (unspecified|unset)$'; then
echo "::error::Remove filter or export-ignore attributes (including Git LFS)."
status=1
fi

exit $status

- name: Check version consistency
run: |
status=0
fail() { echo "::error::$1"; status=1; }

version=$(jq -r .version .claude-plugin/plugin.json)
# A repository-only fix uses a suffix such as 4.3.3-1; the
# DotNetBrowser version is the part before it.
product=${version%%-*}
echo "Plugin version: $version (DotNetBrowser $product)"

if [ "$(jq -r '.plugins[0] | has("version")' .claude-plugin/marketplace.json)" = true ]; then
fail "Remove 'version' from marketplace.json; plugin.json is the only source."
fi
jq -r .description .claude-plugin/plugin.json | grep -qF "DotNetBrowser $product," \
|| fail "plugin.json description does not name DotNetBrowser $product."
jq -r '.plugins[0].description' .claude-plugin/marketplace.json | grep -qF "DotNetBrowser $product," \
|| fail "marketplace.json description does not name DotNetBrowser $product."
grep -qF "DotNetBrowser $product**" README.md \
|| fail "README.md does not name DotNetBrowser $product."
grep -qE "^ product-version: \"$product\"$" skills/dotnetbrowser/SKILL.md \
|| fail "SKILL.md product-version is not $product; replace the skill folder."

if [ "$GITHUB_REF_TYPE" = tag ] && [ "$GITHUB_REF_NAME" != "v$version" ]; then
fail "Tag $GITHUB_REF_NAME does not match plugin version $version."
fi

exit $status
8 changes: 7 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ repository after every release so it always holds the latest one.

3. Bump the version to `<version>` in:
- `.claude-plugin/plugin.json`: `version` and `description`
- `.claude-plugin/marketplace.json`: `version` and `description`
- `.claude-plugin/marketplace.json`: `description` (the version is set only
in `plugin.json`)
- `README.md`: the "DotNetBrowser x.y.z" mention

Clients only receive an update when `version` changes. For a fix to this
Expand All @@ -27,6 +28,11 @@ repository after every release so it always holds the latest one.
claude plugin validate .
```

The `Check` workflow runs on every pull request, on `main`, and on tags. It
validates the plugin, checks the directory limits below, and checks that
the version matches in every place listed in step 3, in `SKILL.md`, and in
the tag.

5. Commit, merge to `main`, and tag the commit with the version:

```bash
Expand Down
Loading