From f6cab74b68f9666f823108b50fc28f8905c05d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Thom?= Date: Sun, 3 Nov 2024 14:33:00 +0100 Subject: [PATCH] Add Release Drafter workflow --- .github/release-drafter.yml | 55 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 41 ++++++++++++++++++++++++++ 2 files changed, 96 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 00000000..0277e65d --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,55 @@ +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 +categories: + - title: 'πŸ’₯ Breaking Changes' + label: 'breaking change' + - title: '✨ New Scripts' + label: 'new script' + - title: 'πŸš€ Updated Scripts' + label: 'update script' + - title: 'πŸ› Bug Fixes' + label: 'bug fix' + - title: '🧰 Maintenance' + label: 'chore' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. +version-resolver: + major: + labels: + - 'breaking change' + minor: + labels: + - 'new script' + - 'update script' + patch: + labels: + - 'bug fix' + - 'chore' + default: patch +# autolabeler: +# - label: 'new script' +# title: +# - '/new script/i' +# - label: 'update script' +# title: +# - '/update script/i' +# - label: 'breaking change' +# title: +# - '/breaking change/i' +# - label: 'bug fix' +# title: +# - '/bug fix/i' +# - label: 'chore' +# files: +# - '*.md' +# - '*.yml' +# - label: 'high risk' +# files: +# - '**/build.func' +# - '**/install.func' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..7b15b48f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - main + # pull_request event is required only for autolabeler + # pull_request: + # # Only following types are handled by the action, but one can default to all as well + # types: [opened, reopened, synchronize] + # # pull_request_target event is required for autolabeler to support PRs from forks + # pull_request_target: + # types: [opened, reopened, synchronize] + +permissions: + contents: read + +jobs: + update_release_draft: + permissions: + # write permission is required to create a github release + contents: write + # write permission is required for autolabeler + # otherwise, read permission is required at least + pull-requests: read + runs-on: ubuntu-latest + steps: + # (Optional) GitHub Enterprise requires GHE_HOST variable set + #- name: Set GHE_HOST + # run: | + # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV + + # Drafts your next Release notes as Pull Requests are merged into "main" + - uses: release-drafter/release-drafter@v6 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + with: + config-name: release-drafter.yml + disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file