-
Notifications
You must be signed in to change notification settings - Fork 32
103 lines (85 loc) · 3.31 KB
/
Copy pathpublish.yml
File metadata and controls
103 lines (85 loc) · 3.31 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Publish to npm
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write # For creating GitHub releases
id-token: write # For npm provenance
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
# Must stay on a line that current npm supports: npm@latest (12.x)
# requires ^22.22.2 || ^24.15.0 || >=26. Pinning '20' here silently
# broke publishing when npm 12 shipped — the upgrade step below fails
# with EBADENGINE before anything is published.
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Upgrade npm for OIDC Trusted Publishing
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Validate skill structure
run: npm run validate
- name: Build skill archives (.zip + .skill)
run: npm run build:skill
- name: Publish to npm
run: npm publish --provenance --access public
- name: Generate release notes from CHANGELOG
run: |
VERSION="${GITHUB_REF_NAME#v}"
# Extract this version's section body: everything between its
# '## [x.y.z]' header and the next '## [' header, dropping the header
# line itself, '---' rules, and leading blank lines.
awk -v ver="$VERSION" '
/^## \[/ { if (p) exit; if (index($0, "## [" ver "]") == 1) { p=1; next } }
p {
if ($0 == "---") next
if (!seen && $0 ~ /^[[:space:]]*$/) next
seen=1; print
}
' CHANGELOG.md > release_notes.md
# Guard: never publish an empty body. A missing section means the tag
# was cut without a matching CHANGELOG entry — fail so it gets fixed.
if ! grep -q '[^[:space:]]' release_notes.md; then
echo "::error::No CHANGELOG.md section found for version $VERSION. Add a '## [$VERSION]' entry before tagging."
exit 1
fi
# Append install instructions below the changelog section.
cat >> release_notes.md <<'EOF'
## Installation
**npm (interactive multi-agent installer):**
```bash
npm install -g @ckelsoe/prompt-architect
npx @ckelsoe/prompt-architect
```
**ChatGPT:**
Download `prompt-architect.zip` below, then in ChatGPT go to
Profile → Skills → New skill → Upload from your computer.
**Gemini CLI / other Agent Skills tools:**
Download `prompt-architect.skill` below (same archive, different
extension) and upload to your tool.
**Claude Code Plugin:**
```
/plugin marketplace add ckelsoe/prompt-architect
/plugin install prompt-architect@prompt-architect-marketplace
```
EOF
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
name: Release ${{ github.ref_name }}
files: |
prompt-architect.zip
prompt-architect.skill
body_path: release_notes.md
draft: false
prerelease: false