@wipcomputer/wip-release 1.9.18 → 1.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +10 -5
- package/core.mjs +12 -10
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -86,20 +86,25 @@ Checks:
|
|
|
86
86
|
|
|
87
87
|
After publishing, wip-release auto-copies SKILL.md to your website as plain text. Any AI can fetch the URL and get clean install instructions.
|
|
88
88
|
|
|
89
|
-
**Setup:**
|
|
89
|
+
**Setup:** Add `.publish-skill.json` to your repo root:
|
|
90
|
+
```json
|
|
91
|
+
{ "name": "wip-my-tool", "websiteRepo": "/path/to/website-repo" }
|
|
92
|
+
```
|
|
90
93
|
|
|
91
94
|
**How it works:**
|
|
92
|
-
1. If SKILL.md exists and
|
|
95
|
+
1. If SKILL.md exists and a website repo is configured, copies SKILL.md to `{website}/wip.computer/install/{name}.txt`
|
|
93
96
|
2. Runs `deploy.sh` in the website repo to push live
|
|
94
97
|
3. Non-blocking: if deploy fails, the release still succeeds
|
|
95
98
|
|
|
99
|
+
**Website repo resolution:**
|
|
100
|
+
1. `.publish-skill.json` `websiteRepo` field (per-repo)
|
|
101
|
+
2. `WIP_WEBSITE_REPO` env var (global fallback)
|
|
102
|
+
|
|
96
103
|
**Name resolution (first match wins):**
|
|
97
|
-
1. `.publish-skill.json`
|
|
104
|
+
1. `.publish-skill.json` `name` field
|
|
98
105
|
2. `package.json` name (with `@scope/` prefix stripped)
|
|
99
106
|
3. Directory name (with `-private` suffix stripped)
|
|
100
107
|
|
|
101
|
-
No config file needed. Every repo with a SKILL.md auto-publishes on release.
|
|
102
|
-
|
|
103
108
|
### Module
|
|
104
109
|
|
|
105
110
|
```javascript
|
package/core.mjs
CHANGED
|
@@ -501,8 +501,17 @@ export function publishClawHub(repoPath, newVersion, notes) {
|
|
|
501
501
|
* Non-blocking: returns result, never throws.
|
|
502
502
|
*/
|
|
503
503
|
export function publishSkillToWebsite(repoPath) {
|
|
504
|
-
|
|
505
|
-
|
|
504
|
+
// Resolve website repo: .publish-skill.json > env var
|
|
505
|
+
let websiteRepo;
|
|
506
|
+
let targetName;
|
|
507
|
+
const configPath = join(repoPath, '.publish-skill.json');
|
|
508
|
+
let publishConfig = {};
|
|
509
|
+
if (existsSync(configPath)) {
|
|
510
|
+
try { publishConfig = JSON.parse(readFileSync(configPath, 'utf8')); } catch {}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
websiteRepo = publishConfig.websiteRepo || process.env.WIP_WEBSITE_REPO;
|
|
514
|
+
if (!websiteRepo) return { skipped: true, reason: 'no websiteRepo in .publish-skill.json and WIP_WEBSITE_REPO not set' };
|
|
506
515
|
|
|
507
516
|
// Find SKILL.md: check root, then skills/*/SKILL.md
|
|
508
517
|
let skillFile = join(repoPath, 'SKILL.md');
|
|
@@ -520,16 +529,9 @@ export function publishSkillToWebsite(repoPath) {
|
|
|
520
529
|
// Resolve target name: config > package.json > directory name
|
|
521
530
|
// SKILL.md frontmatter name is skipped because it's a short slug
|
|
522
531
|
// (e.g., "memory") not the full install name (e.g., "memory-crystal").
|
|
523
|
-
let targetName;
|
|
524
532
|
|
|
525
533
|
// 1. Explicit config (optional, overrides auto-detect)
|
|
526
|
-
|
|
527
|
-
if (existsSync(configPath)) {
|
|
528
|
-
try {
|
|
529
|
-
const config = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
530
|
-
if (config.name) targetName = config.name;
|
|
531
|
-
} catch {}
|
|
532
|
-
}
|
|
534
|
+
if (publishConfig.name) targetName = publishConfig.name;
|
|
533
535
|
|
|
534
536
|
// 2. package.json name (strip @scope/ prefix, most reliable)
|
|
535
537
|
if (!targetName) {
|
package/package.json
CHANGED