From ac2d144710e81e166c771bd03d39b8827ab0ea98 Mon Sep 17 00:00:00 2001 From: Maycon Costa Date: Mon, 7 Nov 2022 11:22:59 +1100 Subject: [PATCH] Add auto release workflows --- .github/release-drafter.yml | 46 ++++++++++++++++++++++++++++++ .github/workflows/auto-release.yml | 23 +++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/auto-release.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..2670e8b --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,46 @@ +name-template: '$RESOLVED_VERSION' +tag-template: '$RESOLVED_VERSION' +version-template: '$MAJOR.$MINOR.$PATCH' +version-resolver: + major: + labels: + - 'major' + minor: + labels: + - 'minor' + - 'enhancement' + patch: + labels: + - 'auto-update' + - 'patch' + - 'fix' + - 'bugfix' + - 'bug' + - 'hotfix' + default: 'minor' + +categories: +- title: 'πŸš€ Enhancements' + labels: + - 'enhancement' + - 'patch' +- title: 'πŸ› Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - 'hotfix' +- title: 'πŸ€– Automatic Updates' + labels: + - 'auto-update' + +change-template: | +
+ $TITLE @$AUTHOR (#$NUMBER) + + $BODY +
+ +template: | + ## What’s Changed + $CHANGES \ No newline at end of file diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 0000000..8429189 --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,23 @@ +name: auto-release + +on: + push: + branches: + - master + +jobs: + publish: + runs-on: ubuntu-latest + steps: + # Get PR from merged commit to master + - uses: actions-ecosystem/action-get-merged-pull-request@v1 + id: get-merged-pull-request + with: + github_token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + publish: ${{ !contains(steps.get-merged-pull-request.outputs.labels, 'no-release') }} + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} \ No newline at end of file