Skip to content

Commit

Permalink
Addressed comments made in the PR and added get-changelog file
Browse files Browse the repository at this point in the history
  • Loading branch information
dcleres committed Oct 9, 2024
1 parent 89fc01a commit 6a18ae2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
labels: |
org.opencontainers.image.created=${{ env.COMMITED_AT }}
org.opencontainers.image.version=v${{ env.VERSION }}
org.opencontainers.image.maintainer=Stijn Vermeeren <[email protected]>
org.opencontainers.image.authors=Stijn Vermeeren <[email protected]>
flavor: |
latest=false
tags: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
labels: |
org.opencontainers.image.created=${{ env.COMMITED_AT }}
org.opencontainers.image.version=v${{ env.VERSION }}
org.opencontainers.image.maintainer=Stijn Vermeeren <[email protected]>
org.opencontainers.image.author=Stijn Vermeeren <[email protected]>
tags: |
type=semver,pattern=v{{version}}
Expand Down Expand Up @@ -89,8 +89,8 @@ jobs:
- name: Commit, push and create pull request
run: |
git config --global user.email "office@geowerkstatt.ch"
git config --global user.name "SwissTopo-Build"
git config --global user.email "stijn.vermeeren@swisstopo.ch"
git config --global user.name "Github build action"
git commit -am "$GIT_COMMIT_MESSAGE"
git push --set-upstream origin $GIT_BRANCH_NAME
gh pr create --title "$GIT_COMMIT_MESSAGE" --body ""
23 changes: 23 additions & 0 deletions get-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# This script gets all changelog entries from CHANGELOG.md since last release.

set -e

tempDir="$(mktemp -d)"
tempFile=$tempDir/gh_release_notes.md

# Get changelog entries since last release
cat CHANGELOG.md | \
grep -Pazo '(?s)(?<=\#{2} \[Unreleased\]\n{2}).*?(?=\n\#{2} v|$)' \
> $tempFile

# Improve readability and add some icons
sed -i -E 's/(###) (Added)/\1 🚀 \2/' $tempFile
sed -i -E 's/(###) (Changed)/\1 🔨 \2/' $tempFile
sed -i -E 's/(###) (Fixed)/\1 🐛 \2/' $tempFile
sed -i 's/\x0//g' $tempFile

cat $tempFile

# Cleanup temporary files
trap 'rm -rf -- "$tempDir"' EXIT

0 comments on commit 6a18ae2

Please sign in to comment.