From 6a5b40bb511a9494e9b72073de6263034fde2d46 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 18 Oct 2023 09:15:34 +0200 Subject: [PATCH] build: Create release --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 206a1ce..ccdca65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,3 +96,37 @@ jobs: if: env.exists == 'false' run: | rm -f ${HOME}/.docker/config.json + - + name: Get previous tag + if: env.exists == 'false' + id: previousTag + run: | + name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -1) + echo "previousTag: $name" + echo "previousTag=$name" >> $GITHUB_ENV + - + name: Generate changelog + if: env.exists == 'false' + id: changelog + uses: requarks/changelog-action@v1 + with: + token: ${{ github.token }} + fromTag: ${{ github.ref_name }} + toTag: ${{ env.previousTag }} + writeToFile: false + reverseOrder: true + includeInvalidCommits: true + excludeTypes: "docs,build,chore" + - + name: Create a release + if: env.exists == 'false' + uses: action-pack/github-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} + with: + tag: "v${{ steps.prepare.outputs.version }}" + title: "v${{ steps.prepare.outputs.version }}" + body: | + ${{ steps.changelog.outputs.changes }} + + **Full Changelog**: https://github.com/${{ github.repository }}/compare//${{ env.previousTag }}...v${{ steps.prepare.outputs.version }}