Skip to content

Release v1.6.3 (#61) #22

Release v1.6.3 (#61)

Release v1.6.3 (#61) #22

Workflow file for this run

name: Publish Release
on:
push:
tags:
- "v*"
jobs:
create-release:
name: Create GitHub release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract changelog entry
id: changelog
run: |
VERSION="${GITHUB_REF_NAME#v}"
echo "Preparing release notes for version ${VERSION}"
awk -v ver="$VERSION" '
BEGIN { in_section = 0 }
/^## \[/ {
if (in_section) exit
if ($0 ~ "^## \\[" ver "\\]") {
in_section = 1
}
}
in_section { print }
' CHANGELOG.md > RELEASE_BODY.md
if [ ! -s RELEASE_BODY.md ]; then
echo "Unable to find changelog entry for version ${VERSION}" >&2
exit 1
fi
- name: Publish release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
bodyFile: RELEASE_BODY.md
allowUpdates: true