Skip to content

Create Release

Create Release #2

Workflow file for this run

name: Create Release
on:
push:
tags:
- "v*"
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Get version from tag
id: tag_name
run: |
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Get changelog entry
id: changelog
run: |
VERSION=${{ steps.tag_name.outputs.VERSION }}
CHANGELOG=$(sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | head -n -1)
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Release ${{ steps.tag_name.outputs.VERSION }}
body: ${{ steps.changelog.outputs.CHANGELOG }}
draft: false
prerelease: false