ci: add GitHub Actions for ClawHub validation and tag-based publishing#2
ci: add GitHub Actions for ClawHub validation and tag-based publishing#2galetahub wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds CI automation to validate and publish this OpenClaw plugin via GitHub Actions, integrating ClawHub CLI checks into the repo’s delivery workflow.
Changes:
- Add
validate.ymlto run typecheck/build and ClawHub package validation on pushes/PRs tomain(Node 22/24 matrix). - Add
publish.ymlto publish to ClawHub onv*tag pushes (Node 24), including validation and a dry-run gate before the real publish.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| .github/workflows/validate.yml | New CI workflow to typecheck/build and run ClawHub validation (and intended dry-run publish) on main activity. |
| .github/workflows/publish.yml | New release workflow to validate and publish to ClawHub on version tag pushes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Set up pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
There was a problem hiding this comment.
Fixed. Pinned pnpm/action-setup to version: 10.33.1
| - name: Install ClawHub CLI | ||
| run: npm install -g clawhub@latest | ||
|
|
||
| - name: ClawHub validate | ||
| run: clawhub package validate . | ||
|
|
||
| - name: ClawHub publish (dry run) | ||
| run: clawhub package publish . --family code-plugin --dry-run |
There was a problem hiding this comment.
Verified this isn't the case: clawhub package validate and clawhub package publish --dry-run both succeed without authentication
| - name: Set up pnpm | ||
| uses: pnpm/action-setup@v4 | ||
|
|
| - name: Install ClawHub CLI | ||
| run: npm install -g clawhub@latest |
There was a problem hiding this comment.
Intentional: the ClawHub CLI talks to the live registry, whose API moves quickly
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.33.1 | ||
|
|
||
| - name: Set up Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: |
There was a problem hiding this comment.
Thanks, but we're intentionally keeping major-version tags (@v4) here.
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10.33.1 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: |
There was a problem hiding this comment.
Thanks, but we're intentionally keeping major-version tags (@v4) here.
Summary
Adds two GitHub Actions workflows:
validate.yml— validates the plugin on every push and pull request tomain.publish.yml— publishes the plugin to ClawHub when av*tag is pushed.validate.ymlRuns on
push/pull_requesttargetingmain(plus manualworkflow_dispatch), on a Node 22 + 24 matrix:pnpm run typecheckpnpm run buildclawhub package validate .clawhub package publish . --family code-plugin --dry-runpublish.ymlRuns on
pushof tags matchingv*, on Node 24:pnpm install --frozen-lockfile,pnpm run buildclawhub login --token "$CLAWHUB_TOKEN"+clawhub whoamiclawhub package validate .clawhub package publish . --family code-plugin --dry-run(safety gate)clawhub package publish . --family code-plugin(real publish)