ci: ClawHub publish workflow (release + manual dry-run)#3
Conversation
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>
There was a problem hiding this comment.
💡 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) |
There was a problem hiding this comment.
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 👍 / 👎.
Why
You can add a token in GitHub and publish to ClawHub from CI instead of running the
clawhubCLI by hand each release.What
.github/workflows/publish-clawhub.yml:clawhubCLI, authenticates with aCLAWHUB_TOKENrepo secret.wordpress-api-pro/SKILL.mdfront matter — the value ClawHub displays, so there's one source of truth.clawhub skill publish wordpress-api-pro --version <version>(publishes the payload dir only).workflow_dispatchwith adry_runtoggle (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 fromclawhub loginlocally or your ClawHub account. Then run the workflow from the Actions tab with dry-run on to confirm before the first real release.Verification
versioncorrectly (3.5.0on current main;3.5.1once fix: drop requirements.txt from ClawHub payload (v3.5.1) #2 merges).CLAWHUB_TOKENsecret; that's why dry-run is the default for manual runs.Built from the ClawHub CLI docs (cli reference).
🤖 Generated with Claude Code