Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test release notes to delete before merge | ||
on: push | ||
jobs: | ||
display-github-release-notes: | ||
Check failure on line 5 in .github/workflows/test_release_notes.yml GitHub Actions / Test release notes to delete before mergeInvalid workflow file
|
||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
needs: build-n-publish | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Extract version from _version.py | ||
id: get_version | ||
run: | | ||
version=$(python -c "exec(open('_version.py').read()); print(__version__)") | ||
echo "VERSION=$version" >> $GITHUB_ENV | ||
- 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; print}" CHANGELOG.md) | ||
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV | ||
echo "$notes" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Display release notes | ||
run: echo "${{ env.RELEASE_NOTES }}" |