diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..fb0a0ca --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Main +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Install Claude Code + run: | + curl -fsSL https://claude.ai/install.sh | bash + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + - run: claude --version + - name: Validate manifests + run: | + claude plugin validate --strict . + for dir in plugins/*/; do + claude plugin validate --strict "$dir" + done + - name: Test + run: | + for dir in plugins/*/; do + claude plugin test "$dir" + done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bc2bd20 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..466df71 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} diff --git a/README.md b/README.md index bc61c9c..c0ea480 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,12 @@ claude --plugin-dir plugins/shelltime-statusline The engine writes the API types beside a loaded mod in `.claude-plugin/types/`, along with a `tsconfig.json`, so `tsc -p plugins/shelltime-statusline` type-checks it. +## Release + +Commits follow [Conventional Commits](https://www.conventionalcommits.org). On `main`, [release-please](https://github.com/googleapis/release-please) keeps a release PR open. Merging it tags `vX.Y.Z`, updates `CHANGELOG.md` and bumps the version in each mod's `plugin.json`, which is what tells installed copies to update. + +When you add a mod, add its `.claude-plugin/plugin.json` to `extra-files` in `release-please-config.json`. + ## License MIT diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..b26c94b --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,30 @@ +{ + "include-component-in-tag": false, + "packages": { + ".": { + "release-type": "simple", + "versioning": "always-bump-patch", + "extra-files": [ + { + "type": "json", + "path": "plugins/shelltime-statusline/.claude-plugin/plugin.json", + "jsonpath": "$.version" + } + ], + "changelog-sections": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "perf", "section": "Performance Improvements" }, + { "type": "refactor", "section": "Code Refactoring" }, + { "type": "docs", "section": "Documentation" }, + { "type": "chore", "section": "Miscellaneous Chores" }, + { "type": "build", "section": "Build System" }, + { "type": "ci", "section": "Continuous Integration" }, + { "type": "test", "section": "Tests" }, + { "type": "style", "section": "Styles" }, + { "type": "revert", "section": "Reverts" } + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}