diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a646a32..76e9d5a 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -9,12 +9,12 @@ categories: - 'bug' - title: 'Maintenance' - label: + labels: - 'code quality' - 'documentation' - title: 'Dependency updates' - label: + labels: - 'dependencies' change-template: '- $TITLE #$NUMBER' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 8074ae1..3b0d8fa 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,15 +2,30 @@ name: Release Drafter on: push: - # branches to consider in the event; optional, defaults to all branches: - - master + - 'master' + tags: + - 'v*' jobs: update_release_draft: name: Update Release Draft runs-on: ubuntu-latest + if: > + github.repository_owner == 's4u' + && (startsWith(github.ref, 'refs/tags/') || !startsWith(github.event.head_commit.message , '[maven-release-plugin]')) + steps: - - uses: release-drafter/release-drafter@v5.12.1 + - id: is-tag + run: | + echo "::set-output name=name::${GITHUB_REF#refs/tags/}" + echo "::set-output name=tag::true" + if: github.repository_owner == 's4u' && startsWith(github.ref, 'refs/tags/') + + - uses: release-drafter/release-drafter@v5.13.0 + with: + publish: ${{ steps.is-tag.outputs.tag }} + name: ${{ steps.is-tag.outputs.name }} + tag: ${{ steps.is-tag.outputs.name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}