Skip to content

Commit 8c5819e

Browse files
committed
Add GitHub Actions for downstream notifications and releases
notify-downstream.yml: When SPEC.md changes on main, opens issues on agentwebprotocol.org, agent-json.org, agent.json CLI, and mcp-server repos alerting them to update their embedded copies. Requires AWP_NOTIFY_TOKEN secret in repo settings — a GitHub PAT with repo scope that can create issues across the org's repos. release.yml: When a v* tag is pushed, creates a GitHub Release with the changelog section extracted from SPEC.md, attaching the spec file.
1 parent b587690 commit 8c5819e

2 files changed

Lines changed: 115 additions & 0 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Notify downstream repos on spec change
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: ['SPEC.md']
7+
8+
jobs:
9+
notify:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Get commit info
15+
id: commit
16+
run: |
17+
echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
18+
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
19+
20+
- name: Notify agentwebprotocol.org
21+
env:
22+
GH_TOKEN: ${{ secrets.AWP_NOTIFY_TOKEN }}
23+
run: |
24+
gh issue create \
25+
--repo agentwebprotocol/agentwebprotocol.org \
26+
--title "Spec updated: ${{ steps.commit.outputs.message }}" \
27+
--body "SPEC.md was updated in [spec@${{ steps.commit.outputs.sha }}](https://github.com/agentwebprotocol/spec/commit/${{ github.sha }}).
28+
29+
**Action needed:**
30+
- [ ] Update \`public/llms-full.txt\` with new spec content
31+
32+
The \`/spec\` page auto-fetches from GitHub — already showing latest." \
33+
--label "spec-update" || true
34+
35+
- name: Notify agent-json.org
36+
env:
37+
GH_TOKEN: ${{ secrets.AWP_NOTIFY_TOKEN }}
38+
run: |
39+
gh issue create \
40+
--repo agentwebprotocol/agent-json.org \
41+
--title "Spec updated: ${{ steps.commit.outputs.message }}" \
42+
--body "SPEC.md was updated in [spec@${{ steps.commit.outputs.sha }}](https://github.com/agentwebprotocol/spec/commit/${{ github.sha }}).
43+
44+
**Action needed (if schema fields changed):**
45+
- [ ] Update \`src/lib/schema.ts\`
46+
- [ ] Update \`src/lib/examples.ts\` if relevant
47+
- [ ] Update \`public/agent.json\` if relevant" \
48+
--label "spec-update" || true
49+
50+
- name: Notify agent.json CLI
51+
env:
52+
GH_TOKEN: ${{ secrets.AWP_NOTIFY_TOKEN }}
53+
run: |
54+
gh issue create \
55+
--repo agentwebprotocol/agent.json \
56+
--title "Spec updated: ${{ steps.commit.outputs.message }}" \
57+
--body "SPEC.md was updated in [spec@${{ steps.commit.outputs.sha }}](https://github.com/agentwebprotocol/spec/commit/${{ github.sha }}).
58+
59+
**Action needed (if schema fields changed):**
60+
- [ ] Update \`src/schema.js\` validation rules
61+
- [ ] Bump version and \`npm publish\`" \
62+
--label "spec-update" || true
63+
64+
- name: Notify MCP server
65+
env:
66+
GH_TOKEN: ${{ secrets.AWP_NOTIFY_TOKEN }}
67+
run: |
68+
gh issue create \
69+
--repo agentwebprotocol/mcp-server \
70+
--title "Spec updated: ${{ steps.commit.outputs.message }}" \
71+
--body "SPEC.md was updated in [spec@${{ steps.commit.outputs.sha }}](https://github.com/agentwebprotocol/spec/commit/${{ github.sha }}).
72+
73+
**Action needed:**
74+
- [ ] Update embedded spec in \`src/index.js\`
75+
- [ ] Bump version and \`npm publish\`" \
76+
--label "spec-update" || true

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Extract version from tag
16+
id: version
17+
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
18+
19+
- name: Extract changelog for this version
20+
id: changelog
21+
run: |
22+
# Extract the changelog section for this version
23+
awk "/^### v${{ steps.version.outputs.version }}/,/^### v[0-9]|^---/{
24+
if (/^### v[0-9]/ && !/v${{ steps.version.outputs.version }}/) exit
25+
if (/^---/) exit
26+
print
27+
}" SPEC.md > /tmp/changelog.md
28+
echo "body<<EOF" >> $GITHUB_OUTPUT
29+
cat /tmp/changelog.md >> $GITHUB_OUTPUT
30+
echo "EOF" >> $GITHUB_OUTPUT
31+
32+
- name: Create GitHub Release
33+
env:
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
run: |
36+
gh release create "v${{ steps.version.outputs.version }}" \
37+
--title "AWP Spec v${{ steps.version.outputs.version }}" \
38+
--notes-file /tmp/changelog.md \
39+
SPEC.md

0 commit comments

Comments
 (0)