From 369cf847d7eba3e7cb8a24f1f98dfaac78b99eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CAshutosh-Bhadauriya=E2=80=9D?= Date: Wed, 2 Apr 2025 08:35:24 +0530 Subject: [PATCH] enhancement: add release drafter and pr template --- .github/pull_request_template.md | 12 +++++ .github/release-drafter-config.yml | 75 +++++++++++++++++++++++++++ .github/workflows/release-drafter.yml | 25 +++++++++ .github/workflows/release-package.yml | 2 +- 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/release-drafter-config.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..93a9f6f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ +### Breaking Changes + + +### New Features + + +### Bug Fixes + + +### Checklist +- [ ] Version bumped +- [ ] Documentation updated \ No newline at end of file diff --git a/.github/release-drafter-config.yml b/.github/release-drafter-config.yml new file mode 100644 index 0000000..8f9d0fc --- /dev/null +++ b/.github/release-drafter-config.yml @@ -0,0 +1,75 @@ +name-template: "v$RESOLVED_VERSION 🚀" +tag-template: "v$RESOLVED_VERSION" +categories: + - title: "⚠️ Breaking Changes" + labels: + - "breaking" + - "major" + - title: "🚀 Features" + labels: + - "feature" + - "enhancement" + - title: "🐛 Bug Fixes" + labels: + - "fix" + - "bugfix" + - "bug" + - title: "🧰 Maintenance" + labels: + - "chore" + - "maintenance" + - title: "📚 Documentation" + labels: + - "documentation" + - title: "⬆️ Dependencies" + collapse-after: 5 + labels: + - "dependencies" + +change-template: "- $TITLE @$AUTHOR (#$NUMBER)" +change-title-escapes: '\<*_&' +version-resolver: + major: + labels: + - "major" + - "breaking" + minor: + labels: + - "minor" + - "feature" + patch: + labels: + - "patch" + - "fix" + - "bugfix" + - "bug" + default: patch + +sort-by: "merged_at" +sort-direction: "descending" + +exclude-labels: + - "skip-changelog" + +autolabeler: + - label: "documentation" + files: + - "*.md" + - label: "bug" + branch: + - '/fix\/.+/' + title: + - "/fix/i" + - label: "feature" + branch: + - '/feature\/.+/' + - label: "dependencies" + files: + - "yarn.lock" + +template: | + ## Changes in Release v$RESOLVED_VERSION + + $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..71b812a --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,25 @@ +name: Release Drafter + +on: + push: + branches: + - main + pull_request: + types: [opened, reopened, synchronize] + workflow_dispatch: + +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: + config-name: release-drafter-config.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index 53cff0e..119e503 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -2,7 +2,7 @@ name: Release the Authsignal React Native package on: release: - types: [created] + types: [published] jobs: publish: