Skip to content

Commit b174f24

Browse files
committed
feat: refresh skill publish workflows
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
1 parent fb8e0b0 commit b174f24

28 files changed

+2521
-246
lines changed

.github/workflows/release.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Release Assets
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
23+
- name: Install validation dependencies
24+
run: npm install --no-save ajv@8 ajv-formats@3
25+
26+
- name: Validate schema before release
27+
run: |
28+
node <<'NODE'
29+
const fs = require('node:fs');
30+
const Ajv2020 = require('ajv/dist/2020').default;
31+
const addFormats = require('ajv-formats').default;
32+
33+
const schema = JSON.parse(fs.readFileSync('schemas/skill.schema.json', 'utf8'));
34+
const example = JSON.parse(fs.readFileSync('examples/skill.json', 'utf8'));
35+
36+
const ajv = new Ajv2020({ allErrors: true, strict: false });
37+
addFormats(ajv);
38+
const validate = ajv.compile(schema);
39+
const ok = validate(example);
40+
41+
if (!ok) {
42+
console.error(JSON.stringify(validate.errors, null, 2));
43+
process.exit(1);
44+
}
45+
46+
console.log('Schema validation passed.');
47+
NODE
48+
49+
- name: Publish GitHub release
50+
uses: softprops/action-gh-release@v2
51+
with:
52+
generate_release_notes: true
53+
files: |
54+
action.yml
55+
entrypoint.mjs
56+
schemas/skill.schema.json
57+
examples/skill.json
58+
README.md
59+
CITATION.cff
60+
.zenodo.json
61+
apis.json
62+
llms.txt
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Schema Validate
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- schemas/**
7+
- examples/**
8+
- action.yml
9+
- entrypoint.mjs
10+
- README.md
11+
- CITATION.cff
12+
- .zenodo.json
13+
- apis.json
14+
- llms.txt
15+
push:
16+
branches:
17+
- main
18+
paths:
19+
- schemas/**
20+
- examples/**
21+
- action.yml
22+
- entrypoint.mjs
23+
- README.md
24+
- CITATION.cff
25+
- .zenodo.json
26+
- apis.json
27+
- llms.txt
28+
workflow_dispatch:
29+
30+
jobs:
31+
validate:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
42+
- name: Install validation dependencies
43+
run: npm install --no-save ajv@8 ajv-formats@3
44+
45+
- name: Validate example skill manifest
46+
run: |
47+
node <<'NODE'
48+
const fs = require('node:fs');
49+
const Ajv2020 = require('ajv/dist/2020').default;
50+
const addFormats = require('ajv-formats').default;
51+
52+
const schema = JSON.parse(fs.readFileSync('schemas/skill.schema.json', 'utf8'));
53+
const example = JSON.parse(fs.readFileSync('examples/skill.json', 'utf8'));
54+
55+
const ajv = new Ajv2020({ allErrors: true, strict: false });
56+
addFormats(ajv);
57+
const validate = ajv.compile(schema);
58+
const ok = validate(example);
59+
60+
if (!ok) {
61+
console.error(JSON.stringify(validate.errors, null, 2));
62+
process.exit(1);
63+
}
64+
65+
console.log('Schema validation passed for examples/skill.json');
66+
NODE

.zenodo.json

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"title": "skill-publish",
3-
"description": "GitHub Action for validating, quoting, publishing, and polling HCS-26 skill releases through Registry Broker. Canonical product URLs: https://hol.org/registry, https://hol.org/registry/skills, https://hol.org/docs/registry-broker/.",
3+
"description": "Official GitHub Action for validating, quoting, publishing, and polling HCS-26 skill releases through the Hashgraph Online Registry Broker.",
44
"upload_type": "software",
55
"access_right": "open",
66
"license": "apache-2.0",
@@ -15,7 +15,9 @@
1515
"registry",
1616
"hedera",
1717
"hcs-26",
18-
"skills"
18+
"skills",
19+
"registry-broker",
20+
"openapi"
1921
],
2022
"related_identifiers": [
2123
{
@@ -33,10 +35,30 @@
3335
"relation": "isDocumentedBy",
3436
"scheme": "url"
3537
},
38+
{
39+
"identifier": "https://hol.org/registry/docs",
40+
"relation": "isDocumentedBy",
41+
"scheme": "url"
42+
},
3643
{
3744
"identifier": "https://hol.org/registry/api/v1/openapi.json",
3845
"relation": "documents",
3946
"scheme": "url"
47+
},
48+
{
49+
"identifier": "https://raw.githubusercontent.com/hashgraph-online/skill-publish/main/schemas/skill.schema.json",
50+
"relation": "isDerivedFrom",
51+
"scheme": "url"
52+
},
53+
{
54+
"identifier": "https://raw.githubusercontent.com/hashgraph-online/skill-publish/main/apis.json",
55+
"relation": "hasPart",
56+
"scheme": "url"
57+
},
58+
{
59+
"identifier": "https://raw.githubusercontent.com/hashgraph-online/skill-publish/main/llms.txt",
60+
"relation": "hasPart",
61+
"scheme": "url"
4062
}
4163
]
4264
}

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
```bash
5757
npx skill-publish
5858
npx skill-publish setup --account-id 0.0.12345 --hedera-private-key <key>
59-
npx skill-publish scaffold-repo ./weather-skill --name weather-skill
59+
npx skill-publish create ./weather-skill --name weather-skill --preset api
6060
npx skill-publish publish ./weather-skill
6161
```
6262

@@ -96,8 +96,10 @@ Core flows:
9696

9797
```bash
9898
npx skill-publish setup --account-id 0.0.12345 --hedera-private-key <key> --hbar 5
99+
npx skill-publish create ./weather-skill --name weather-skill --preset api
99100
npx skill-publish init ./skills/my-skill
100101
npx skill-publish doctor ./skills/my-skill
102+
npx skill-publish doctor ./skills/my-skill --fix --local-only
101103
npx skill-publish validate ./skills/my-skill
102104
RB_API_KEY=rbk_xxx npx skill-publish quote ./skills/my-skill
103105
RB_API_KEY=rbk_xxx npx skill-publish publish ./skills/my-skill
@@ -111,6 +113,9 @@ npx skill-publish setup-action . --skill-dir skills/my-skill
111113

112114
# Scaffold a new repository with skill package + GitHub workflow preconfigured
113115
npx skill-publish scaffold-repo ./weather-skill --name weather-skill
116+
117+
# Golden path: scaffold repo, repair package metadata, and prepare for publish
118+
npx skill-publish create ./weather-skill --name weather-skill --preset api
114119
```
115120

116121
Distribution helper flows:

action.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ inputs:
4040
description: "When true, posts results to release notes or merged PR"
4141
required: false
4242
default: "true"
43+
submit-indexnow:
44+
description: "When true, submits canonical skill URLs to IndexNow after publish or skip-existing"
45+
required: false
46+
default: "false"
4347
github-token:
4448
description: "GitHub token used for release or PR annotations"
4549
required: false
@@ -77,12 +81,81 @@ outputs:
7781
estimated-cost-hbar:
7882
description: "Estimated HBAR quoted for the publish"
7983
value: ${{ steps.publish.outputs.estimated-cost-hbar }}
84+
skill-page-url:
85+
description: "Canonical skill detail page URL for the resolved name@version"
86+
value: ${{ steps.publish.outputs.skill-page-url }}
87+
entity-url:
88+
description: "Machine-readable entity metadata URL for the canonical skill page"
89+
value: ${{ steps.publish.outputs.entity-url }}
90+
docs-url:
91+
description: "Canonical HOL docs URL for the registry"
92+
value: ${{ steps.publish.outputs.docs-url }}
93+
openapi-url:
94+
description: "Canonical OpenAPI URL for the registry API"
95+
value: ${{ steps.publish.outputs.openapi-url }}
96+
install-url-pinned-skill-md:
97+
description: "Pinned SKILL.md resolver URL"
98+
value: ${{ steps.publish.outputs.install-url-pinned-skill-md }}
99+
install-url-latest-skill-md:
100+
description: "Latest SKILL.md resolver URL"
101+
value: ${{ steps.publish.outputs.install-url-latest-skill-md }}
102+
install-url-pinned-manifest:
103+
description: "Pinned manifest resolver URL"
104+
value: ${{ steps.publish.outputs.install-url-pinned-manifest }}
105+
install-url-latest-manifest:
106+
description: "Latest manifest resolver URL"
107+
value: ${{ steps.publish.outputs.install-url-latest-manifest }}
108+
install-metadata-pinned-url:
109+
description: "Pinned install metadata URL"
110+
value: ${{ steps.publish.outputs.install-metadata-pinned-url }}
111+
install-metadata-latest-url:
112+
description: "Latest install metadata URL"
113+
value: ${{ steps.publish.outputs.install-metadata-latest-url }}
114+
badge-markdown:
115+
description: "Markdown badge snippet for the resolved version"
116+
value: ${{ steps.publish.outputs.badge-markdown }}
117+
badge-html:
118+
description: "HTML badge snippet for the resolved version"
119+
value: ${{ steps.publish.outputs.badge-html }}
120+
markdown-link:
121+
description: "Markdown link snippet for the canonical skill page"
122+
value: ${{ steps.publish.outputs.markdown-link }}
123+
html-link:
124+
description: "HTML link snippet for the canonical skill page"
125+
value: ${{ steps.publish.outputs.html-link }}
126+
readme-snippet:
127+
description: "README markdown snippet with canonical install links"
128+
value: ${{ steps.publish.outputs.readme-snippet }}
129+
docs-snippet:
130+
description: "Docs snippet with canonical HOL links"
131+
value: ${{ steps.publish.outputs.docs-snippet }}
132+
citation-snippet:
133+
description: "Citation snippet pointing to canonical HOL metadata"
134+
value: ${{ steps.publish.outputs.citation-snippet }}
135+
release-notes:
136+
description: "Release notes markdown snippet with canonical install and badge links"
137+
value: ${{ steps.publish.outputs.release-notes }}
138+
package-metadata-json:
139+
description: "Package metadata JSON block pointing to canonical HOL URLs"
140+
value: ${{ steps.publish.outputs.package-metadata-json }}
141+
codemeta-json:
142+
description: "CodeMeta JSON document for the resolved skill version"
143+
value: ${{ steps.publish.outputs.codemeta-json }}
144+
attested-kit-json:
145+
description: "Full attested distribution kit JSON payload"
146+
value: ${{ steps.publish.outputs.attested-kit-json }}
147+
next-actions:
148+
description: "Post-publish next steps summary"
149+
value: ${{ steps.publish.outputs.next-actions }}
80150
result-json:
81151
description: "Raw result JSON payload"
82152
value: ${{ steps.publish.outputs.result-json }}
83153
annotation-target:
84154
description: "Where annotations were posted"
85155
value: ${{ steps.publish.outputs.annotation-target }}
156+
indexnow-result:
157+
description: "IndexNow submission result when submit-indexnow is enabled"
158+
value: ${{ steps.publish.outputs.indexnow-result }}
86159
runs:
87160
using: "composite"
88161
steps:
@@ -104,5 +177,6 @@ runs:
104177
INPUT_POLL_TIMEOUT_MS: ${{ inputs.poll-timeout-ms }}
105178
INPUT_POLL_INTERVAL_MS: ${{ inputs.poll-interval-ms }}
106179
INPUT_ANNOTATE: ${{ inputs.annotate }}
180+
INPUT_SUBMIT_INDEXNOW: ${{ inputs.submit-indexnow }}
107181
INPUT_GITHUB_TOKEN: ${{ inputs.github-token }}
108182
run: node "${{ github.action_path }}/entrypoint.mjs"

apis.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "skill-publish",
3+
"description": "GitHub Action for validating, quoting, publishing, and polling HCS-26 skill releases through Registry Broker.",
4+
"url": "https://github.com/hashgraph-online/skill-publish",
5+
"specificationVersion": "0.19",
6+
"apis": [
7+
{
8+
"name": "Registry Broker REST API",
9+
"description": "Canonical API used by the skill-publish workflow for skill quote, publish, and job polling.",
10+
"type": "openapi",
11+
"url": "https://hol.org/registry/api/v1/openapi.json",
12+
"humanURL": "https://hol.org/registry/docs"
13+
}
14+
],
15+
"tags": [
16+
"hcs-26",
17+
"skills",
18+
"registry-broker",
19+
"github-action",
20+
"hedera"
21+
],
22+
"contact": {
23+
"name": "Hashgraph Online",
24+
"url": "https://hol.org/registry"
25+
},
26+
"externalDocs": {
27+
"url": "https://hol.org/docs/registry-broker/",
28+
"description": "Registry Broker architecture and integration documentation."
29+
}
30+
}

0 commit comments

Comments
 (0)