Skip to content

Commit

Permalink
Fix auto-release again (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
WarningImHack3r authored Oct 15, 2023
1 parent ff6fbf6 commit 566ca16
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
echo current_version=$(echo $latest_tag | sed "s/v//") >> $GITHUB_OUTPUT
echo version=$(node -pe "require('./package.json').version") >> $GITHUB_OUTPUT
# Get all changes & authors of commits since last release, excluding merge commits and commits from dependabot
IFS=$'\n' changes=($(git log $latest_tag..HEAD --pretty="%s" --no-merges --invert-grep --grep="dependabot"))
IFS=$'\n' authors=($(git log $latest_tag..HEAD --pretty="%ae" --no-merges --invert-grep --grep="dependabot"))
# Get all changes & authors of commits since last release, excluding merge commits and commits from dependabot or renovate
IFS=$'\n' changes=($(git log $latest_tag..HEAD --pretty="%s" --no-merges --perl-regexp --author='^((?!dependabot\[bot\]|renovate).*)$'))
IFS=$'\n' authors=($(git log $latest_tag..HEAD --pretty="%ae" --no-merges --perl-regexp --author='^((?!dependabot\[bot\]|renovate).*)$'))
# Map author emails to GitHub usernames in a map
declare -A author_map
Expand Down Expand Up @@ -61,11 +61,13 @@ jobs:
echo "Changelog: ${changelog[*]}"
# Export the changelog as a string
echo changelog='${changelog[*]}' >> $GITHUB_OUTPUT
echo "changelog<<EOF"$'\n'"${changelog[*]}"$'\n'EOF >> $GITHUB_OUTPUT
- name: ✨ Create release
if: steps.version-check.outputs.version != steps.version-check.outputs.current_version
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version-check.outputs.version }}
release_name: ${{ steps.version-check.outputs.version }}
Expand Down

0 comments on commit 566ca16

Please sign in to comment.