Skip to content

ci: ClawHub publish workflow (release + manual dry-run)#3

Merged
BenKalsky merged 1 commit into
mainfrom
ci/clawhub-publish
Jun 1, 2026
Merged

ci: ClawHub publish workflow (release + manual dry-run)#3
BenKalsky merged 1 commit into
mainfrom
ci/clawhub-publish

Conversation

@BenKalsky
Copy link
Copy Markdown
Member

Why

You can add a token in GitHub and publish to ClawHub from CI instead of running the clawhub CLI by hand each release.

What

.github/workflows/publish-clawhub.yml:

  • Installs the clawhub CLI, authenticates with a CLAWHUB_TOKEN repo secret.
  • Reads the version from wordpress-api-pro/SKILL.md front matter — the value ClawHub displays, so there's one source of truth.
  • Runs clawhub skill publish wordpress-api-pro --version <version> (publishes the payload dir only).
  • Triggers: on a published GitHub Release (real publish) + workflow_dispatch with a dry_run toggle (default on) to preview the publish plan without uploading.

README gains a "Publishing to ClawHub" section documenting the secret + release flow.

One-time setup (you)

Add a repo secret CLAWHUB_TOKEN (Settings → Secrets and variables → Actions). Get it from clawhub login locally or your ClawHub account. Then run the workflow from the Actions tab with dry-run on to confirm before the first real release.

Verification

  • ✅ Workflow YAML parses; the version-parse step extracts the SKILL.md front-matter version correctly (3.5.0 on current main; 3.5.1 once fix: drop requirements.txt from ClawHub payload (v3.5.1) #2 merges).
  • ⚠️ Live publish untested from CI — needs the CLAWHUB_TOKEN secret; that's why dry-run is the default for manual runs.

Built from the ClawHub CLI docs (cli reference).

🤖 Generated with Claude Code

Automate publishing the skill to ClawHub via GitHub Actions so releases don't
need a local `clawhub` CLI run.

- .github/workflows/publish-clawhub.yml: installs the clawhub CLI, authenticates
  with a CLAWHUB_TOKEN repo secret, reads the version from wordpress-api-pro/
  SKILL.md front matter (the value ClawHub displays), and runs
  `clawhub skill publish wordpress-api-pro --version <version>`.
- Triggers: on a published GitHub Release (real publish) and workflow_dispatch
  (with a dry_run toggle, default on, to preview the plan without uploading).
- README: "Publishing to ClawHub" section documenting the CLAWHUB_TOKEN secret
  and the release flow.

Validated: workflow YAML parses; version-parse step extracts the SKILL.md
front-matter version correctly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88393c61c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ARGS=("$SKILL_DIR" --version "${{ steps.ver.outputs.version }}")
if [ "$DRY_RUN" = "true" ]; then
echo "Dry run — no upload."
ARGS+=(--dry-run)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a supported dry-run command

For manual workflow runs with the default dry_run: true, this appends --dry-run to clawhub skill publish, but the ClawHub CLI reference documents skill publish <path> with publish flags such as --version/--owner and documents dry-run support on sync/package publishing instead; the official skill-publish workflow builds previews with clawhub sync --all --dry-run. As written, the advertised manual preview path is likely to fail before producing a publish plan, so use the supported sync dry-run flow or remove the unsupported flag for skill publish.

Useful? React with 👍 / 👎.

@BenKalsky BenKalsky merged commit 91c2e58 into main Jun 1, 2026
3 checks passed
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.

1 participant