Skip to content

Commit

Permalink
Merge pull request #828 from elezar/fix-release-workflows
Browse files Browse the repository at this point in the history
[no-relnote] Fix helm release workflow
  • Loading branch information
elezar authored Jul 31, 2024
2 parents 5a09d5c + c2f52cc commit e5804eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,10 @@ jobs:
fetch-depth: 0

- name: Update helm index
env:
VERSION: ${{ github.event.release.tag_name }}
DOWNLOAD_URL: ${{ join(github.event.release.assets.*.browser_download_url, ' ') }}
run: |
git config user.name "Github Actions"
git config user.email "[email protected]"
./hack/update-helm-index.sh --helm-repo-path $HELM_REPO_PATH $DOWNLOAD_URL
./hack/update-helm-index.sh --helm-repo-path $HELM_REPO_PATH --version ${{ github.event.release.tag_name }}
- name: Push updated Helm charts and index to gh-pages branch
run: |
Expand Down
9 changes: 7 additions & 2 deletions hack/generate-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ this=`basename $0`
usage () {
cat << EOF
Generate a changelog for the specified tag
Usage: $this --reference <tag> [--remote <remote_name>]
Usage: $this --since <tag> [--remote <remote_name>]
Options:
--since specify the tag to start the changelog from (default: latest tag)
Expand Down Expand Up @@ -70,10 +70,15 @@ if [ -z "$REFERENCE" ]; then
fi
fi

SHA=$(git rev-parse ${VERSION})
if [[ $? -ne 0 ]]; then
SHA="HEAD"
fi

# Print the changelog
echo "## Changelog"
echo ""
echo "### Version $VERSION"

# Iterate over the commit messages and ignore the ones that start with "Merge" or "Bump"
git log --pretty=format:"%s" $REFERENCE..@ | grep -Ev "(^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed 's/^\(.*\)/- \1/g'
git log --pretty=format:"%s" $REFERENCE..$SHA | grep -Ev "(^Merge )|(^Bump)|(no-rel-?note)|(^---)" | sed 's/^\(.*\)/- \1/g'

0 comments on commit e5804eb

Please sign in to comment.