From c97581d58cbcba8acfabed4ce60d496403bf2c98 Mon Sep 17 00:00:00 2001 From: Khashayar Barooti Date: Thu, 24 Oct 2024 12:21:52 +0100 Subject: [PATCH] added release please --- .github/workflow/pull-request-title.yml | 29 +++++++++++++++++++++++++ .github/workflow/release.yml | 21 ++++++++++++++++++ .release-please-manifest.json | 1 + release-please-config.json | 17 +++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 .github/workflow/pull-request-title.yml create mode 100644 .github/workflow/release.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflow/pull-request-title.yml b/.github/workflow/pull-request-title.yml new file mode 100644 index 0000000..c34746f --- /dev/null +++ b/.github/workflow/pull-request-title.yml @@ -0,0 +1,29 @@ +name: Pull Request + +on: + merge_group: + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + conventional-title: + name: Validate PR title is Conventional Commit + runs-on: ubuntu-latest + steps: + - name: Check title + if: github.event_name == 'pull_request_target' + uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + fix + feat + chore \ No newline at end of file diff --git a/.github/workflow/release.yml b/.github/workflow/release.yml new file mode 100644 index 0000000..bd34dfa --- /dev/null +++ b/.github/workflow/release.yml @@ -0,0 +1,21 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release-please: + name: Create Release + outputs: + release-pr: ${{ steps.release.outputs.pr }} + tag-name: ${{ steps.release.outputs.tag_name }} + runs-on: ubuntu-latest + steps: + - name: Run release-please + id: release + uses: google-github-actions/release-please-action@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + command: manifest \ No newline at end of file diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..59fed2a --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{".":"0.1.0"} \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..887dee8 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,17 @@ +{ + "release-type": "simple", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "pull-request-title-pattern": "chore: Release ${version}", + "group-pull-request-title-pattern": "chore: Release ${version}", + "packages": { + ".": { + "release-type": "simple", + "include-component-in-tag": false + } + }, + "plugins": [ + "sentence-case" + ] +} + \ No newline at end of file