forked from Jeffallan/claude-skills
-
Notifications
You must be signed in to change notification settings - Fork 9
90 lines (75 loc) · 2.2 KB
/
Copy pathrelease.yml
File metadata and controls
90 lines (75 loc) · 2.2 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
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
validate:
name: Validate
uses: ./.github/workflows/validate.yml
release:
name: Build & Release
needs: validate
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Extract release notes from CHANGELOG
id: changelog
run: |
VERSION="${{ steps.version.outputs.VERSION }}"
# Extract content between this version header and the next version header
NOTES=$(awk -v ver="$VERSION" '
/^## \[/ {
if (found) exit
if ($0 ~ "\\[" ver "\\]") found=1
next
}
found { print }
' CHANGELOG.md)
# Handle multi-line output
echo "NOTES<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: site/package-lock.json
- name: Build documentation site
run: |
cd site
npm ci
npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: site/dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.version.outputs.VERSION }}
body: |
${{ steps.changelog.outputs.NOTES }}
---
**Documentation:** https://jeffallan.github.io/claude-skills/
draft: false
prerelease: false