Merge pull request #23 from netresearch/feat/release-announcements #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| markdown: | |
| name: Markdown | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.0.0 | |
| yamllint: | |
| name: YAML | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1 | |
| shellcheck: | |
| name: ShellCheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0 | |
| with: | |
| severity: error | |
| env: | |
| SHELLCHECK_OPTS: -x | |
| version: | |
| name: Plugin Version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Validate plugin.json version | |
| run: | | |
| if [ ! -f ".claude-plugin/plugin.json" ]; then | |
| echo "::error::.claude-plugin/plugin.json not found" | |
| exit 1 | |
| fi | |
| PLUGIN_VERSION=$(python3 -c "import json; print(json.load(open('.claude-plugin/plugin.json'))['version'])") | |
| echo "plugin.json version: $PLUGIN_VERSION" | |
| if [[ "$GITHUB_REF" == refs/tags/v* ]]; then | |
| TAG_VERSION="${GITHUB_REF#refs/tags/v}" | |
| echo "Git tag version: $TAG_VERSION" | |
| if [ "$TAG_VERSION" != "$PLUGIN_VERSION" ]; then | |
| echo "::error::Version mismatch! Tag v${TAG_VERSION} != plugin.json ${PLUGIN_VERSION}" | |
| echo "::error::Update .claude-plugin/plugin.json version to match the release tag" | |
| exit 1 | |
| fi | |
| echo "Version match confirmed" | |
| else | |
| echo "Not a tag push — skipping tag/version comparison" | |
| if ! echo "$PLUGIN_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+'; then | |
| echo "::error::Invalid version format in plugin.json: $PLUGIN_VERSION" | |
| exit 1 | |
| fi | |
| echo "Version format valid" | |
| fi |