Skip to content

Create Release Test #23

Create Release Test

Create Release Test #23

name: Create Release Test
on:
workflow_dispatch:
jobs:
create_release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Escape version
run: echo "ESCAPED_VERSION=$(echo "${{ vars.TEST_VERSION }}" | sed 's/[^^]/[&]/g; s/\^/\\^/g')" >> $GITHUB_ENV
- name: Parse release notes
run: |
(grep -Pzo '(?<=### v${{ env.ESCAPED_VERSION }}\n)\X+?(?=\n\n)' README.md) | tr -d '\0' > release_notes.txt
ls -l
cat release_notes.txt
- name: Create release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ vars.TEST_VERSION }}
release_name: v${{ vars.TEST_VERSION }}
body_path: ${{ github.workspace }}/release_notes.txt