Skip to content

Commit c71d4f3

Browse files
build: derive root marketplace from generated Agent Bundle
1 parent 0e960db commit c71d4f3

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎.cursor-plugin/marketplace.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"name": "plugin-library-marketplace",
3-
"owner": { "name": "plugin-library" },
3+
"owner": {
4+
"name": "plugin-library"
5+
},
46
"plugins": [
57
{
6-
"name": "plugin-library",
78
"description": "Browse installed and marketplace plugins, read every skill in full, and hand one to a Grok Bot.",
9+
"name": "plugin-library",
810
"source": "./artifact"
911
}
1012
]

‎.github/workflows/publish-agent-bundle.yml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,20 @@ jobs:
3232
- name: Build and verify artifact
3333
run: npm run check
3434

35+
- name: Generate repository marketplace from artifact
36+
run: |
37+
node --input-type=module <<'JS'
38+
import { readFileSync, writeFileSync } from 'node:fs';
39+
const marketplace = JSON.parse(readFileSync('artifact/.cursor-plugin/marketplace.json', 'utf8'));
40+
for (const plugin of marketplace.plugins) plugin.source = './artifact';
41+
writeFileSync('.cursor-plugin/marketplace.json', JSON.stringify(marketplace, null, 2) + '\n');
42+
JS
43+
3544
- name: Commit generated artifact on main
3645
run: |
3746
git config user.name github-actions[bot]
3847
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
39-
git add --force --all artifact
48+
git add --force --all artifact .cursor-plugin/marketplace.json
4049
if git diff --cached --quiet; then
4150
exit 0
4251
fi

0 commit comments

Comments
 (0)