feat: add GitHub Actions workflow for automated release creation and update CHANGELOG.md structure

This commit is contained in:
2025-02-16 10:26:43 +01:00
parent 2f34a0ca4e
commit 7ccacec68f
10 changed files with 191 additions and 3 deletions

33
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get version from tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Read CHANGELOG.md
id: changelog
run: |
CHANGELOG=$(awk "/## \[${{ steps.get_version.outputs.VERSION }}\]/{p=1;print;next} /## \[/{p=0} p" CHANGELOG.md)
echo "::set-output name=CHANGES::$CHANGELOG"
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.changelog.outputs.CHANGES }}
draft: false
prerelease: false