From 3ee4cfeab741487c7f55049a67beaa5fc07d7aa0 Mon Sep 17 00:00:00 2001 From: geobelsky Date: Wed, 8 Apr 2026 18:39:32 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20plugin=20repo=20sync=20=E2=80=94=20prese?= =?UTF-8?q?rve=20.git=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous find command deleted .git despite -not filter. Replaced with ls + grep approach that reliably excludes .git. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/npm-publish.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e78a08f..f6eb7e4 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -31,13 +31,16 @@ jobs: PLUGIN_REPO_TOKEN: ${{ secrets.PLUGIN_REPO_TOKEN }} run: | git clone https://x-access-token:${PLUGIN_REPO_TOKEN}@github.com/AxmeAI/axme-code-plugin.git /tmp/plugin-repo - # Remove old files (except .git) - find /tmp/plugin-repo -maxdepth 1 -not -name '.git' -not -name '.' -exec rm -rf {} + - # Copy new plugin bundle (including dotfiles) - cp -r dist/plugin/. /tmp/plugin-repo/ - # Keep README - cp /tmp/plugin-repo/README.md /tmp/plugin-repo/README.md 2>/dev/null || true cd /tmp/plugin-repo + # Remove old files (except .git and .gitignore) + ls -A | grep -v '^\.\(git\|gitignore\)$' | xargs rm -rf + # Copy new plugin bundle + cp -r ${GITHUB_WORKSPACE}/dist/plugin/. . + cp ${GITHUB_WORKSPACE}/dist/plugin/.mcp.json . + cp -r ${GITHUB_WORKSPACE}/dist/plugin/.claude-plugin . + # Remove sourcemaps and node_modules (not needed in repo) + rm -f *.map + rm -rf node_modules package-lock.json git config user.name "github-actions" git config user.email "github-actions@github.com" git add -A