Files
meehl 2374d26018
Release / create-release (push) Successful in 19s
Add release workflow
2025-10-18 17:49:24 +02:00

34 lines
923 B
YAML

name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Extract changelog
id: changelog
run: |
VERSION=${{ steps.version.outputs.RELEASE_VERSION }}
# Extract content between this version and the next section
NOTES=$(sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '1d;$d')
echo "NOTES<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.NOTES }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}