| | name: Project release on Github |
| |
|
| | on: |
| | workflow_dispatch: |
| | push: |
| | tags: |
| | - "v2.[0-9]+.[0-9]+*" |
| | |
| | - "!v2.[0-9]+.[0-9]-rc0" |
| |
|
| | jobs: |
| | generate-notes: |
| | runs-on: ubuntu-latest |
| |
|
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@v4 |
| | with: |
| | fetch-tags: true |
| | fetch-depth: 0 |
| |
|
| | - name: Parse version |
| | id: version |
| | run: | |
| | echo "current_release=$(awk -F \\- '{print $1}' < VERSION.txt)" >> "$GITHUB_OUTPUT" |
| | echo "current_pre_release=$(awk -F \\- '{print $2}' < VERSION.txt)" >> "$GITHUB_OUTPUT" |
| | |
| | - name: Install reno |
| | run: | |
| | python -m pip install --upgrade pip |
| | pip install "reno<5" |
| | |
| | - name: Generate release notes for release candidates - minor releases |
| | if: steps.version.outputs.current_pre_release != '' && endsWith(steps.version.outputs.current_release, '.0') |
| | env: |
| | |
| | |
| | |
| | EARLIEST_VERSION: v${{ steps.version.outputs.current_release }}-rc0 |
| | run: | |
| | reno report --no-show-source --ignore-cache --earliest-version "$EARLIEST_VERSION" -o relnotes.rst |
| | |
| | - name: Generate release notes for release candidates - bugfix releases |
| | if: steps.version.outputs.current_pre_release != '' && !endsWith(steps.version.outputs.current_release, '.0') |
| | env: |
| | |
| | |
| | |
| | |
| | EARLIEST_VERSION: v${{ steps.version.outputs.current_release }}-rc1 |
| | run: | |
| | reno report --no-show-source --ignore-cache --earliest-version "$EARLIEST_VERSION" -o relnotes.rst |
| | |
| | - name: Generate release notes for the final release |
| | if: steps.version.outputs.current_pre_release == '' |
| | |
| | |
| | run: | |
| | reno report --no-show-source --ignore-cache --version v${{ steps.version.outputs.current_release }} -o relnotes.rst |
| | |
| | - name: Convert to Markdown |
| | uses: docker://pandoc/core:3.1 |
| | with: |
| | args: "--from rst --to markdown_github --no-highlight relnotes.rst -o relnotes.md --wrap=none" |
| |
|
| | - name: Debug |
| | run: | |
| | cat relnotes.md |
| | |
| | - uses: ncipollo/release-action@v1 |
| | with: |
| | bodyFile: "relnotes.md" |
| | prerelease: ${{ steps.version.outputs.current_pre_release }} |
| | allowUpdates: true |
| |
|