Skip to content

[FEAT] Update release flow to create release and publish on merge with main #4

[FEAT] Update release flow to create release and publish on merge with main

[FEAT] Update release flow to create release and publish on merge with main #4

name: Test release notes to delete before merge
on: pull_request
jobs:
display-github-release-notes:

Check failure on line 5 in .github/workflows/test_release_notes.yml

View workflow run for this annotation

GitHub Actions / Test release notes to delete before merge

Invalid workflow file

The workflow is not valid. .github/workflows/test_release_notes.yml (Line: 5, Col: 3): The workflow must contain at least one job with no dependencies.
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 }}"