Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/clawhub-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ name: ClawHub publish
# Skills have no OIDC/trusted-publisher option yet, so this uses
# CLAWHUB_TOKEN, a token from `clawhub login` + `clawhub token`, scoped to
# the charming publisher (clawhub.ai/settings?view=organizations).
#
# IMPORTANT: merging a PR to main does NOT publish anything here — only
# `pull_request` (dry-run, no token) or `release: published` (real sync)
# trigger a run, and nothing on main fires a release event by itself. A
# skills/** change sits unpublished on ClawHub until someone tags a
# release. See "Releasing" in CONTRIBUTING.md.

on:
pull_request:
Expand Down
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ Issues and pull requests are welcome.
5. Explain the user-visible effect in the pull request.

Do not edit `src/generated/operations.ts` directly. If the API contract changed, update `openapi.json` and run `bun run openapi:gen`.

## Releasing

Merging a PR to `main` does not publish anything. In particular, a `skills/**` change sits unpublished on ClawHub until a release ships — `clawhub-publish.yml` only runs a `--dry-run` on a pull request; the real `sync` (with `CLAWHUB_TOKEN`) runs on the `release: published` event only, and nothing on `main` fires that automatically.

To ship a release (npm + GitHub release + ClawHub sync, in one shot):

1. Bump `version` in `package.json`.
2. Commit and merge that change to `main`.
3. Tag the merge commit and push the tag: `git tag vX.Y.Z && git push origin vX.Y.Z`. The tag must match `package.json`'s version exactly, or `release.yml` fails its verification step.

The tag push runs `bun run check`, publishes to npm (trusted publishing, no manual token), creates the GitHub release, and — because that release triggers `clawhub-publish.yml`'s `publish` job — syncs `skills/charming` to ClawHub. If you only need the ClawHub side (no npm-worthy change), run the `ClawHub publish` workflow manually instead: **Actions → ClawHub publish → Run workflow**.