Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
harleymckenzie committed Mar 1, 2024
1 parent d9f4856 commit 58d7bb3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/increase-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,16 @@ jobs:
id: generate_commit_message_list
run: |
# Get commit messages since last release in bullet point format
COMMIT_MESSAGES=$(git log --pretty=format:"%s" "${{ steps.get_current_tag.outputs.current_tag }}..HEAD" | grep -vE "#patch|#minor|#major" | sed 's/^/- /')
# Add 'Whats changed since last release' to the commit messages
COMMIT_MESSAGES=$(echo -e "Whats changed since last release\n\n${COMMIT_MESSAGES}")
echo "Commit messages: ${COMMIT_MESSAGES}"
echo "commit_messages=${COMMIT_MESSAGES}" >> $GITHUB_OUTPUT
COMMIT_MESSAGES=$(git log --pretty=format:"- %s" "${{ steps.get_current_tag.outputs.current_tag }}..HEAD" | grep -vE "#patch|#minor|#major")
# URL encode newlines to %0A for GitHub Actions output compatibility
COMMIT_MESSAGES="${COMMIT_MESSAGES//$'\n'/%0A}"
# Prepend header to the commit messages, URL encoding the newlines
COMMIT_MESSAGES="Whats changed since last release%0A%0A${COMMIT_MESSAGES}"
echo "Commit messages: ${COMMIT_MESSAGES//%0A/$'\n'}"
echo "commit_messages<<EOF" >> $GITHUB_OUTPUT
echo -e "${COMMIT_MESSAGES//%0A/$'\n'}" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create release
uses: actions/create-release@v1
id: create_release
Expand Down

0 comments on commit 58d7bb3

Please sign in to comment.