Skip to content

Commit b5b21f1

Browse files
committed
Verify CHANGELOG date in release-github CI job
1 parent a3754b5 commit b5b21f1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,15 @@ jobs:
384384
${{ steps.tag.outputs.group2 }}/Cargo.toml \
385385
| cut -d '"' -f2)"
386386
387+
- name: Ensure CHANGELOG date is today
388+
run: |
389+
today="$(date '+%Y-%m-%d')"
390+
changelog="$(grep -E '^## \[${{ steps.tag.outputs.group3 }}\] ·' \
391+
${{ steps.tag.outputs.group2 }}/CHANGELOG.md \
392+
| cut -d' ' -f4 | tr -d ' ')"
393+
echo "Changelog: $changelog"
394+
echo "Today: $today"
395+
[ "$changelog" = "$today" ]
387396
- name: Parse CHANGELOG link
388397
id: changelog
389398
run: echo "link=${{ github.server_url }}/${{ github.repository }}/blob/${{ steps.tag.outputs.group1 }}/${{ steps.tag.outputs.group2 }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.tag.outputs.group3 }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' ${{ steps.tag.outputs.group2 }}/CHANGELOG.md)"

0 commit comments

Comments
 (0)