File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release Guidelines
2+
3+ on :
4+ push :
5+ tags :
6+ - ' release-*'
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Extract release notes from CHANGELOG
21+ id : release_notes
22+ run : |
23+ TAG="${GITHUB_REF_NAME}"
24+ VERSION="${TAG#release-}"
25+
26+ if [ -f "CHANGELOG.md" ]; then
27+ # Extract the section for this version (between two ## headings)
28+ awk -v ver="$VERSION" '
29+ /^## / {
30+ if (found) exit
31+ if (index($0, ver)) found=1; next
32+ }
33+ found { print }
34+ ' CHANGELOG.md > release-body.md
35+ fi
36+
37+ # Fallback: if no content was extracted, use a placeholder
38+ if [ ! -s "release-body.md" ]; then
39+ echo "Release ${VERSION}" > release-body.md
40+ fi
41+
42+ - name : Setup Pandoc
43+ uses : pandoc/actions/setup@v1
44+
45+ - name : Build docx
46+ run : |
47+ pandoc "Nordic MathML Guidelines.md" \
48+ --from markdown \
49+ --to docx \
50+ --resource-path=. \
51+ -o "Nordic MathML Guidelines.docx"
52+
53+ - name : Create draft release
54+ uses : softprops/action-gh-release@v2
55+ with :
56+ draft : true
57+ body_path : release-body.md
58+ files : |
59+ Nordic MathML Guidelines.docx
60+ Nordic MathML Guidelines.md
You can’t perform that action at this time.
0 commit comments