Skip to content

ci: add GitHub Actions for ClawHub validation and tag-based publishing#2

Open
galetahub wants to merge 3 commits into
mainfrom
ci/github-actions-validate
Open

ci: add GitHub Actions for ClawHub validation and tag-based publishing#2
galetahub wants to merge 3 commits into
mainfrom
ci/github-actions-validate

Conversation

@galetahub

Copy link
Copy Markdown
Contributor

Summary

Adds two GitHub Actions workflows:

  • validate.yml — validates the plugin on every push and pull request to
    main.
  • publish.yml — publishes the plugin to ClawHub when a v* tag is pushed.

validate.yml

Runs on push / pull_request targeting main (plus manual
workflow_dispatch), on a Node 22 + 24 matrix:

  1. pnpm run typecheck
  2. pnpm run build
  3. clawhub package validate .
  4. clawhub package publish . --family code-plugin --dry-run

publish.yml

Runs on push of tags matching v*, on Node 24:

  1. Checkout, pnpm install --frozen-lockfile, pnpm run build
  2. clawhub login --token "$CLAWHUB_TOKEN" + clawhub whoami
  3. clawhub package validate .
  4. clawhub package publish . --family code-plugin --dry-run (safety gate)
  5. clawhub package publish . --family code-plugin (real publish)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.yml to run typecheck/build and ClawHub package validation on pushes/PRs to main (Node 22/24 matrix).
  • Add publish.yml to publish to ClawHub on v* 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.

Comment thread .github/workflows/validate.yml
Comment on lines +23 to +25
- name: Set up pnpm
uses: pnpm/action-setup@v4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Pinned pnpm/action-setup to version: 10.33.1

Comment on lines +41 to +48
- 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified this isn't the case: clawhub package validate and clawhub package publish --dry-run both succeed without authentication

Comment on lines +20 to +22
- name: Set up pnpm
uses: pnpm/action-setup@v4

Comment on lines +37 to +38
- name: Install ClawHub CLI
run: npm install -g clawhub@latest

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Intentional: the ClawHub CLI talks to the live registry, whose API moves quickly

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment on lines +23 to +33
- 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:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, but we're intentionally keeping major-version tags (@v4) here.

Comment on lines +17 to +27
- 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:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, but we're intentionally keeping major-version tags (@v4) here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants