ci: add workflow to publish OpenClaw skills to ClawHub (#55)

* ci: add workflow to publish OpenClaw skills to ClawHub

* ci: use documented clawhub sync flags

* ci: harden publish-skills workflow

- Pin clawhub@0.7.0 for supply-chain safety
- Add concurrency group to prevent parallel publishes
- Add PR dry-run validation
- Guard against missing CLAWHUB_TOKEN secret
- Add changeset file

---------

Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>
This commit is contained in:
jpoehnelt-bot
2026-03-04 12:15:05 -07:00
committed by GitHub
parent 3346f9d68c
commit e8d533e722
2 changed files with 52 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---
Add workflow to publish OpenClaw skills to ClawHub
+47
View File
@@ -0,0 +1,47 @@
name: Publish OpenClaw Skills
on:
push:
branches: [main]
paths:
- "skills/**"
- ".github/workflows/publish-skills.yml"
pull_request:
branches: [main]
paths:
- "skills/**"
- ".github/workflows/publish-skills.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install ClawHub CLI
run: npm i -g clawhub@0.7.0
- name: Publish skills
env:
CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }}
run: |
if [ -z "$CLAWHUB_TOKEN" ]; then
echo "::error::CLAWHUB_TOKEN secret is not set"
exit 1
fi
if [ "${{ github.event_name }}" = "pull_request" ]; then
clawhub sync --root skills --all --dry-run
else
clawhub sync --root skills --all
fi