Skip to content

chore: release v0.1.3 #4

chore: release v0.1.3

chore: release v0.1.3 #4

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Extract version from tag
id: version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
- name: Extract changelog for this version
id: changelog
run: |
# Extract the section for this version from CHANGELOG.md
version="${{ steps.version.outputs.version }}"
awk "/^## \[${version}\]/{found=1; next} /^## \[/{if(found) exit} found" CHANGELOG.md > release_notes.md
if [ ! -s release_notes.md ]; then
echo "Release v${version}" > release_notes.md
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md
draft: false
prerelease: ${{ contains(steps.version.outputs.version, 'rc') || contains(steps.version.outputs.version, 'alpha') || contains(steps.version.outputs.version, 'beta') }}