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
74 changes: 1 addition & 73 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ on:
- main

permissions:
contents: write
issues: write
pull-requests: write
contents: read

jobs:
test:
Expand All @@ -35,73 +33,3 @@ jobs:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TERM: xterm
run: bash tests/run-all-tests.sh

release:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !(contains(github.actor, '[bot]') && startsWith(github.event.head_commit.message, 'chore(release):'))
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Generate bot app token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.MY_RELEASER_ID }}
private-key: ${{ secrets.MY_RELEASER_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install npm dependencies
run: npm ci

- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq

- name: Install yq
uses: mikefarah/yq@v4.40.1

- name: Setup Bats and bats libs
id: setup-bats
uses: bats-core/bats-action@3.0.1

- name: Run tests
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TERM: xterm
run: bash tests/run-all-tests.sh

- name: Release
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
run: |
# Configure git with authentication
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Configure git to use GITHUB_TOKEN for push
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"

# Disable git hooks for automated release commits
# This is intentional - the release commit has already passed all validation
# in the "Run tests" step above. Git hooks (pre-commit, etc.) are designed
# for developer commits and would be redundant here.
git config core.hooksPath /dev/null

# Run semantic-release (handles version bump, commit, push, GitHub release)
npx semantic-release
20 changes: 20 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release Please

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:
# Use GitHub App token for better permissions
token: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/sync-marketplace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Sync Marketplace Version

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main

jobs:
sync-marketplace:
# Only run on Release Please PRs
if: "contains(github.event.pull_request.labels.*.name, 'autorelease: pending')"
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq

- name: Sync marketplace.json version
run: bash scripts/sync-marketplace-version.sh

- name: Check for changes
id: check_changes
run: |
if git diff --quiet .claude-plugin/marketplace.json; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
Comment on lines +31 to +35

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Quote $GITHUB_OUTPUT to avoid word splitting.

Shellcheck SC2086 warns here; quoting is the safe default.

✅ Suggested fix
-          if git diff --quiet .claude-plugin/marketplace.json; then
-            echo "changed=false" >> $GITHUB_OUTPUT
-          else
-            echo "changed=true" >> $GITHUB_OUTPUT
-          fi
+          if git diff --quiet .claude-plugin/marketplace.json; then
+            echo "changed=false" >> "$GITHUB_OUTPUT"
+          else
+            echo "changed=true" >> "$GITHUB_OUTPUT"
+          fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: |
if git diff --quiet .claude-plugin/marketplace.json; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
run: |
if git diff --quiet .claude-plugin/marketplace.json; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
🧰 Tools
🪛 actionlint (1.7.10)

[error] 31-31: shellcheck reported issue in this script: SC2086:info:2:27: Double quote to prevent globbing and word splitting

(shellcheck)


[error] 31-31: shellcheck reported issue in this script: SC2086:info:4:26: Double quote to prevent globbing and word splitting

(shellcheck)

🤖 Prompt for AI Agents
In @.github/workflows/sync-marketplace.yml around lines 31 - 35, The workflow
uses unquoted $GITHUB_OUTPUT in the echo commands which can cause word-splitting
(ShellCheck SC2086); update both echo lines that write to GITHUB_OUTPUT (the
ones echoing "changed=false" and "changed=true" after the git diff check) to
quote the variable as "$GITHUB_OUTPUT" so the output file path is treated as a
single argument.

fi

- name: Commit changes
if: steps.check_changes.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .claude-plugin/marketplace.json
git commit -m "chore: sync marketplace.json version"
git push
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.1"
}
156 changes: 0 additions & 156 deletions .releaserc.js

This file was deleted.

Loading
Loading