Skip to content

Commit

Permalink
added automatic release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEngerd committed Dec 8, 2024
1 parent 7cac33e commit 9ca3060
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,42 @@ jobs:
git commit -m "Update Helm chart repository"
git push
create-release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Generate Release Notes
id: release_notes
run: |
# Get previous tag
prev_tag=$(git describe --tags --abbrev=0 ${{ github.ref_name }}^ 2>/dev/null || echo "")
echo "### Release ${{ github.ref_name }}" > release_notes.md
echo "" >> release_notes.md
# Get all commits between tags
if [ -z "$prev_tag" ]; then
echo "### 🔄 All Commits" >> release_notes.md
git log --pretty=format:"* %h - %s (%an)%n%w(4,4,4)%b" >> release_notes.md
else
echo "### 🔄 Commits since $prev_tag" >> release_notes.md
git log --pretty=format:"* %h - %s (%an)%n%w(4,4,4)%b" $prev_tag..${{ steps.tag.outputs.tag }} >> release_notes.md
fi
echo "" >> release_notes.md
echo "" >> release_notes.md
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body_path: release_notes.md
token: ${{ github.token }}


0 comments on commit 9ca3060

Please sign in to comment.