From 23e75210139cbe7b5abcd07d65e150e9c1069bc4 Mon Sep 17 00:00:00 2001 From: Jonas Holst Damtoft Date: Fri, 15 Nov 2024 18:32:55 +0100 Subject: [PATCH] feat(releases): implement automatic release drafting Should allow us to make better use of the moonraker update channel. --- .github/release-drafter.yml | 54 +++++++++++++++++++++++++++ .github/workflows/release-drafter.yml | 25 +++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..b612aed --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,54 @@ +name-template: "Release v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" +change-title-escapes: '\<*_&' +exclude-labels: + - "skip-changelog" +categories: + - title: "💥 Breaking Changes" + labels: + - breaking-change + - title: "🚀 Features" + labels: + - feature + - title: "🐛 Bug Fixes" + labels: + - bug + - title: "🧰 Maintenance" + labels: + - chore +autolabeler: + - label: "breaking-change" + body: + - "/breaking change/i" + - label: "feature" + branch: + - '/feature\/.+/' + title: + - "/feat/i" + - label: "bug" + branch: + - '/fix\/.+/' + title: + - "/fix/i" + - label: "chore" + title: + - "/chore/" +version-resolver: + major: + labels: + - "breaking-change" + minor: + labels: + - "feature" + patch: + labels: + - "bug" + - "chore" + default: patch +template: | + ## What's Changed + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..c0b1fd7 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,25 @@ +name: Release Drafter + +on: + push: + branches: + - master + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v6 + with: + prerelease: true + prerelease-identifier: beta + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}