-
Notifications
You must be signed in to change notification settings - Fork 58
92 lines (79 loc) · 3.11 KB
/
Copy pathrelease-please.yml
File metadata and controls
92 lines (79 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: release-please
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
publish-skill-asset:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build agentkey.skill zip
run: |
cd skills/agentkey
zip -r "$GITHUB_WORKSPACE/agentkey.skill" . \
-x "*.DS_Store" \
-x "__pycache__/*" \
-x "*.pyc"
echo "--- contents ---"
unzip -l "$GITHUB_WORKSPACE/agentkey.skill"
- name: Upload asset to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.release-please.outputs.tag_name }}
run: |
gh release upload "$TAG" agentkey.skill \
--repo "$GITHUB_REPOSITORY" \
--clobber
publish-clawhub:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
# Pin the CLI for reproducible publishes; bump deliberately.
- name: Install ClawHub CLI
run: npm i -g clawhub@0.18.0
- name: Authenticate with ClawHub
env:
CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }}
run: clawhub login --no-browser --token "$CLAWHUB_TOKEN"
- name: Publish skill to ClawHub
env:
TAG: ${{ needs.release-please.outputs.tag_name }}
run: |
set -euo pipefail
VERSION="${TAG#v}"
# Extract this version's section body from CHANGELOG.md (no header line).
CHANGELOG="$(awk -v v="$VERSION" '
$0 ~ "^## \\[" v "\\]" { f=1; next }
f && /^## \[/ { exit }
f { print }
' CHANGELOG.md | sed '/^[[:space:]]*$/d')"
[ -n "$CHANGELOG" ] || CHANGELOG="Release $TAG"
clawhub skill publish skills/agentkey \
--no-input \
--owner chainbase \
--slug agentkey \
--version "$VERSION" \
--changelog "$CHANGELOG" \
--clawscan-note "Expected behavior: this is an MCP-adapter skill. (1) SKILL.md routes the agent to the remote AgentKey HTTP MCP endpoint (https://api.agentkey.app/v1/mcp) for real-time data (web search, social, on-chain). (2) scripts/check-update.sh makes a read-only curl to the GitHub Releases API to notify when a newer skill version exists; it never modifies the install. This is version checking, not credential exfiltration; the API key is user-provided and stays in standard local MCP config."