name: Release on: push: tags: - 'v*' permissions: contents: write jobs: release: name: Create Release runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Generate changelog id: changelog run: | # Get previous tag PREV_TAG=$(git tag --sort=-v:refname | sed -n '2p') if [ -z "$PREV_TAG" ]; then COMMITS=$(git log --pretty=format:"- %s (%h)" HEAD) else COMMITS=$(git log --pretty=format:"- %s (%h)" "${PREV_TAG}..HEAD") fi { echo 'body<> "$GITHUB_OUTPUT" - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: body: ${{ steps.changelog.outputs.body }} generate_release_notes: false