diff --git a/.github/release.json b/.github/release.json new file mode 100644 index 0000000..89d3f8e --- /dev/null +++ b/.github/release.json @@ -0,0 +1,30 @@ +{ + "categories": [ + { + "title": "## New Features 🎉", + "labels": [ + "new feature" + ] + }, + { + "title": "## Improvements 🛠", + "labels": [ + "improvement" + ] + }, + { + "title": "## Bug Fixes 🐞", + "labels": [ + "bug" + ] + }, + { + "title": "## Other Changes ☕", + "labels": [ + "*" + ] + } + ], + "max_pull_requests": 1000, + "max_back_track_time_days": 1000 +} \ No newline at end of file diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index 6b40266..0000000 --- a/.github/release.yml +++ /dev/null @@ -1,21 +0,0 @@ -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' -template: | - # What's Changed - $CHANGES - **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION - -changelog: - categories: - - title: New Features 🎉 - labels: - - new feature - - title: Improvements 🛠 - labels: - - improvement - - title: Bug Fixes 🐞 - labels: - - bug - - title: Other Changes ☕ - labels: - - "*" diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 995773a..effb89d 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -40,6 +40,12 @@ jobs: run: | echo "::set-output name=LAST_COMMIT::$(git log -n 1)" id: version + - name: Get previous tagged version + id: previous_tagged_version + if: ${{ github.ref == 'refs/heads/master' }} + shell: bash + run: | + echo "::set-output name=OLD_TAGGED_VERSION::$(git for-each-ref --sort=-creatordate --format='%(refname:short)' refs/tags --count 10 | grep -oP '^eris-(\d+).*' | head -1)" - name: Tag shell: bash env: @@ -53,17 +59,21 @@ jobs: ./${GIHUB_WORKSPACE}/util/release.sh - name: Get latest tagged version id: tagged_version + if: ${{ github.ref == 'refs/heads/master' }} shell: bash run: | echo "::set-output name=TAGGED_VERSION::$(git for-each-ref --sort=-creatordate --format='%(refname:short)' refs/tags --count 10 | grep -oP '^eris-(\d+).*' | head -1)" - name: Generate release note - uses: release-drafter/release-drafter@v5.23.0 + uses: mikepenz/release-changelog-builder-action@@v3.7.1 id: release_note if: ${{ github.ref == 'refs/heads/master' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - config-name: release.yml + owner: "kasramp" + config-name: ".github/release.json" + fromTag: ${{ steps.previous_tagged_version.outputs.OLD_TAGGED_VERSION }} + toTag: ${{ steps.tagged_version.outputs.TAGGED_VERSION }} - name: Perform release uses: softprops/action-gh-release@v1 if: ${{ github.ref == 'refs/heads/master' }}