Skip to content

Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.

ci: add GitHub Actions workflow for contextbricks npm publish

Marcus Webb020842d87e1d
diff --git a/.github/workflows/publish-contextbricks.yml b/.github/workflows/publish-contextbricks.yml
new file mode 100644
index 00000000..d4581ee9
--- /dev/null
+++ b/.github/workflows/publish-contextbricks.yml
@@ -0,0 +1,36 @@
+name: Publish contextbricks to npm
+
+on:
+ push:
+ tags:
+ - 'contextbricks-v*'
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: tools/statusline-npm
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ registry-url: 'https://registry.npmjs.org'
+
+ - name: Verify version matches tag
+ run: |
+ TAG_VERSION="${GITHUB_REF_NAME#contextbricks-v}"
+ PKG_VERSION=$(node -p "require('./package.json').version")
+ if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
+ echo "Tag version ($TAG_VERSION) doesn't match package.json ($PKG_VERSION)"
+ exit 1
+ fi
+ echo "Publishing contextbricks v$PKG_VERSION"
+
+ - name: Publish to npm
+ run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}