Skip to content
name: Test release notes to delete before merge
on: push
jobs:
display-github-release-notes:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract version from _version.py
id: get_version
run: |
version=$(python -c "exec(open('pasqal_cloud/_version.py').read()); print(__version__)")
echo "VERSION=$version" >> $GITHUB_ENV
- name: Debug CHANGELOG.md
run: cat CHANGELOG.md
- name: Get release notes from CHANGELOG.md
run: |
version=${{ env.VERSION }}
# Adjusted awk to extract notes with custom section headings and emoji
notes=$(awk "/## \[$version\]/,/^## \[/ {if (/^## \[/) exit; if (NF) print}" CHANGELOG.md)
echo "Extracted notes: $notes"
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
echo "$notes" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Display release notes
run: echo "${{ env.RELEASE_NOTES }}"