Skip to content

Commit caa6efb

Browse files
willwearingclaude
andcommitted
Auto-publish CLI/MCP to npm on push to main
Triggers publish workflow when packages/cli, packages/mcp, or packages/shared change on main. Gracefully skips if the version is already published. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a47d498 commit caa6efb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/publish-packages.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ on:
1818
default: false
1919
type: boolean
2020
push:
21+
branches:
22+
- main
23+
paths:
24+
- 'packages/cli/**'
25+
- 'packages/mcp/**'
26+
- 'packages/shared/**'
2127
tags:
2228
- 'v*'
2329
- 'cli@*'
@@ -73,13 +79,13 @@ jobs:
7379

7480
- name: Publish @graspful/cli
7581
if: (steps.target.outputs.target == 'all' || steps.target.outputs.target == 'cli') && github.event.inputs.dry_run != 'true'
76-
run: cd packages/cli && bun publish --access public
82+
run: cd packages/cli && bun publish --access public || echo "cli already published at this version"
7783
env:
7884
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
7985

8086
- name: Publish @graspful/mcp
8187
if: (steps.target.outputs.target == 'all' || steps.target.outputs.target == 'mcp') && github.event.inputs.dry_run != 'true'
82-
run: cd packages/mcp && bun publish --access public
88+
run: cd packages/mcp && bun publish --access public || echo "mcp already published at this version"
8389
env:
8490
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
8591

0 commit comments

Comments
 (0)