From 8852ac4e7cb5149ade994b3dd1d4b1cf8af592cd Mon Sep 17 00:00:00 2001 From: Aamir Azad <82281117+aamirazad@users.noreply.github.com> Date: Sun, 16 Jun 2024 16:32:25 +0530 Subject: [PATCH] Get up to date with main (#11) --- .github/release-drafter.yml | 101 ++++++++++++++++++++++++++ .github/workflows/pr-tagger.yml | 26 +++++++ .github/workflows/release-drafter.yml | 33 +++++++++ 3 files changed, 160 insertions(+) create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/pr-tagger.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..0d69836 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,101 @@ +name-template: "v$RESOLVED_VERSION" +tag-template: "v$RESOLVED_VERSION" +autolabeler: + - label: "bug" + title: + - "/fix/i" + - label: "feature" + title: + - "/feat/i" + - label: "documentation" + title: + - "/docs/i" + - label: "ci" + title: + - "/ci/i" + - label: "style" + title: + - "/style/i" + - label: "refactor" + title: + - "/refactor/i" + - label: "performance" + title: + - "/perf/i" + - label: "test" + title: + - "/test/i" + - label: "chore" + title: + - "/chore/i" + - label: "breaking" + title: + - "/BREAKING CHANGE/i" + - '/\w+!:/i' + # Adding semantic versioning labels + - label: "major" + title: + - "/BREAKING CHANGE/i" + - '/\w+!:/i' + - label: "minor" + title: + - "/feat/i" + - label: "patch" + title: + - "/fix/i" +categories: + - title: "Breaking Changes" + labels: + - "breaking-change" + - title: "Notable Changes" + labels: + - "notable" + - title: "Features" + labels: + - "enhancement" + - "feature" + - title: "Performance Improvements" + labels: + - "performance" + - title: "Bug Fixes" + labels: + - "bug" + - title: "Documentation" + labels: + - "documentation" + - title: "Style Improvements" + labels: + - "style" + - title: "Maintenance" + labels: + - "chore" + - "deployment" + - "translation" + - "ci" + - "refactor" + - title: "Dependencies" + collapse-after: 3 + labels: + - "dependencies" + - title: "All App Changes" + collapse-after: 1 +exclude-labels: + - "skip-changelog" +category-template: "### $TITLE" +change-template: "- $TITLE @$AUTHOR ([#$NUMBER]($URL))" +change-title-escapes: '\<*_&#@' +template: | + ## v$RESOLVED_VERSION + + $CHANGES +version-resolver: + major: + labels: + - "major" + minor: + labels: + - "minor" + patch: + labels: + - "patch" + default: patch diff --git a/.github/workflows/pr-tagger.yml b/.github/workflows/pr-tagger.yml new file mode 100644 index 0000000..8e0f17b --- /dev/null +++ b/.github/workflows/pr-tagger.yml @@ -0,0 +1,26 @@ +name: PR Tagger + +on: + pull_request: + types: + - opened + - reopened + branches: + - main + +permissions: + contents: read + +jobs: + pr_opened_or_reopened: + name: pr_opened_or_reopened + runs-on: ubuntu-latest + permissions: + # write permission is required for autolabeler + pull-requests: write + if: github.event_name == 'pull_request_target' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request.user.login != 'dependabot' + steps: + - name: Label PR with release-drafter + uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..e6d51cf --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,33 @@ +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] + workflow_dispatch: {} + +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: + # Drafts your next Release notes as Pull Requests are merged + - uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}