Files
claude-hud/.github/workflows/release.yml
Salman Chishti f5cd87db07 Upgrade GitHub Actions for Node 24 compatibility (#234)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-03-20 11:41:27 +11:00

41 lines
989 B
YAML

name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20.x
cache: npm
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run test:coverage
- name: Extract release notes from CHANGELOG
run: |
version="${GITHUB_REF_NAME#v}"
awk -v version="$version" '
$0 ~ "^## \\[" version "\\]" { in_section = 1; next }
in_section && $0 ~ "^## \\[" { exit }
in_section { print }
' CHANGELOG.md > RELEASE_NOTES.md
if [ ! -s RELEASE_NOTES.md ]; then
echo "No changelog section found for version $version"
exit 1
fi
- name: Create release
uses: softprops/action-gh-release@v2
with:
body_path: RELEASE_NOTES.md