Skip to content

Commit

Permalink
Pins the CHANGELOG URL to the release.
Browse files Browse the repository at this point in the history
  • Loading branch information
tommie committed Dec 29, 2023
1 parent 5f4b046 commit e004460
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ jobs:
run: |
set -o pipefail
version_date=$(sed -e 's;^##\s\+\[\(v[0-9.]\+\)\]\(\s\|-\)*\([0-9-]\+\);\1 \3; p ; d' CHANGELOG.md | head -n 1)
version=${version_date% *}
date=${version_date#* }
version=$(sed -e 's;^##\s\+\[\(v[0-9.]\+\)\].*;\1; p ; d' CHANGELOG.md | head -n 1)
echo "version=$version" >>"$GITHUB_OUTPUT"
echo "url=https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md#${version//./}---$date" >>"$GITHUB_OUTPUT"
echo "url=https://github.com/${{ github.repository }}/blob/$version/CHANGELOG.md" >>"$GITHUB_OUTPUT"
- name: Create Release
- id: create_release
name: Create Release
uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
Expand All @@ -35,3 +34,7 @@ jobs:
draft: true
allowUpdates: true
updateOnlyUnreleased: true

- name: Create Summary
run: |
echo "Release: ${{ steps.create_release.outputs.html_url }}" >>"$GITHUB_STEP_SUMMARY"

0 comments on commit e004460

Please sign in to comment.