From 11071158755a41fee8bdf801c0b9c3586a83fe58 Mon Sep 17 00:00:00 2001 From: Paulo Santos Date: Fri, 2 Feb 2024 15:04:02 +0000 Subject: [PATCH] Add a workflow to generate a new release on pushing to master --- .github/release-drafter.yml | 55 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 24 +++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..2a772fa --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,55 @@ +name-template: '$RESOLVED_VERSION' +tag-template: 'v$RESOLVED_VERSION' + +categories: + - title: 💥 Breaking Changes + label: breaking + + - title: 🚀 New Features + label: feature + + - title: 🐛 Bug Fixes + label: bug + + - title: ✨ Improvements + label: enhancement + + - title: 📝 Documentation Updates + label: documentation + + - title: 🔧 Internal Changes + label: internal + + - title: 🚦 Tests + label: test + + - title: 📦 Dependency Updates + collapse-after: 5 + label: dependencies + +exclude-labels: + - skip-changelog + +version-resolver: + major: + labels: + - breakinng + minor: + labels: + - feature + - enhancement + - documentation + - dependencies + patch: + labels: + - bug + - internal + - test + default: minor + +change-template: '- $TITLE (#$NUMBER) @$AUTHOR' +no-changes-template: '- No changes' +template: | + $CHANGES + + **Full Changelog:** https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..00c2006 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Create a new release on GitHub + +on: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + create-release: + permissions: + # write permission is required to create a github release + contents: write + # read permission is required + pull-requests: read + runs-on: ubuntu-latest + + steps: + - uses: release-drafter/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}