Skip to content

Commit

Permalink
Performs checkout before trying to read the changelog.
Browse files Browse the repository at this point in the history
Also catches pipeline errors.
  • Loading branch information
tommie committed Dec 29, 2023
1 parent dbf7cf8 commit ebcc447
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Get Changelog Information
id: changelog
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#* }
echo "version=$version" >>"$GITHUB_OUTPUT"
echo "url=https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md#${version//./}---$date" >>"$GITHUB_OUTPUT"
Expand Down

0 comments on commit ebcc447

Please sign in to comment.