Repository navigation
73 lines (61 loc) · 2.83 KB
/
Copy pathrelease.yml
File metadata and controls
73 lines (61 loc) · 2.83 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
name: Release
# Builds the plugin ZIPs (scripts/build-release.py) and attaches them to a GitHub release:
# ccxt-openai-<version>.zip upload at platform.openai.com/plugins
# ccxt-claude-<version>.zip the Claude ccxt plugin (Claude's "Upload plugin")
# ccxt-local-claude-<version>.zip the Claude ccxt-local plugin
# Push a tag such as v0.0.1 to publish a release. A run started by hand from the Actions tab
# builds and checks the ZIPs and keeps them as a workflow artifact, without a release.
on:
push:
tags: [ 'v*' ]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build and check the ZIPs
run: |
pip install --quiet jsonschema
python3 scripts/build-release.py dist
- name: Validate the Claude plugins for the plugin directory
run: |
npm install -g --no-audit --no-fund @anthropic-ai/claude-code >/dev/null
for dir in claude/ccxt claude/ccxt-local; do
claude plugin validate --profile directory "$dir"
done
- name: Keep the ZIPs with the run
uses: actions/upload-artifact@v4
with:
name: plugin-zips
path: dist/*.zip
- name: Publish the release
if: startsWith(github.ref, 'refs/tags/')
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: |
versions=$(python3 -c 'import json
for p in ("chatgpt/ccxt/plugin.json", "claude/ccxt/.claude-plugin/plugin.json", "claude/ccxt-local/.claude-plugin/plugin.json"):
print("- `" + p.split("/")[0] + "/" + p.split("/")[1] + "` " + json.load(open(p))["version"])')
cat > notes.md <<EOF
Plugin ZIPs built from ${GITHUB_SHA::7}.
| File | For |
|---|---|
| \`ccxt-openai-*.zip\` | Upload at [platform.openai.com/plugins](https://platform.openai.com/plugins). It has only the \`ccxt\` usage skill and no \`.app.json\`: OpenAI refuses app references in uploads. |
| \`ccxt-claude-*.zip\` | The Claude \`ccxt\` plugin: the hosted server, its skill and the CCXT coding skills. |
| \`ccxt-local-claude-*.zip\` | The Claude \`ccxt-local\` plugin: the CCXT MCP server on your computer (\`npx -y ccxt-mcp\`). |
Plugin versions:
${versions}
The one-click bundle for Claude Desktop (\`ccxt-mcp.mcpb\`) is released with ccxt/ccxt: https://github.com/ccxt/ccxt/releases/download/ccxt-mcp-latest/ccxt-mcp.mcpb
EOF
if gh release view "$TAG" >/dev/null 2>&1; then
gh release upload "$TAG" dist/*.zip --clobber
else
gh release create "$TAG" dist/*.zip --title "$TAG" --notes-file notes.md
fi