From b5c5f59e0f8e6edf7d026a25cc22d394a09a4e3a Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sun, 24 Sep 2023 12:06:13 +0300 Subject: [PATCH] =?UTF-8?q?chore:=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D1=82=20Github=20Actions=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-title.yml | 6 ++-- .github/workflows/release.yml | 30 +++++++++++++++++++ .releaserc.json | 53 ++++++++-------------------------- 3 files changed, 44 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index db4bf61..3221a02 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -13,11 +13,9 @@ jobs: name: Проверка PR заголовка runs-on: ubuntu-latest steps: - # Please look up the latest version from - # https://github.com/amannn/action-semantic-pull-request/releases - - uses: amannn/action-semantic-pull-request@v3.4.6 + - uses: amannn/action-semantic-pull-request@v5 env: - GITHUB_TOKEN: ${{ secrets.TERRAFORM_YANDEX_COMPUTE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: # Configure which types are allowed. # Default: https://github.com/commitizen/conventional-commit-types diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f5698f1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + name: release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Semantic Release + uses: cycjimmy/semantic-release-action@м4 + with: + branches: | + [ + '+([0-9])?(.{+([0-9]),x}).x', + 'main' + ] + extra_plugins: | + @semantic-release/commit-analyzer + @semantic-release/release-notes-generator + @semantic-release/git + @semantic-release/changelog + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.releaserc.json b/.releaserc.json index be56e3d..aba080c 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -7,48 +7,19 @@ [ "@semantic-release/commit-analyzer", { - "preset": "ESLint", + "preset": "angular", "releaseRules": [ - { - "tag": "breaking", - "release": "major" - }, - { - "tag": "chore", - "release": false - }, - { - "tag": "ci", - "release": false - }, - { - "tag": "docs", - "release": false - }, - { - "tag": "feat", - "release": "minor" - }, - { - "tag": "fix", - "release": "patch" - }, - { - "tag": "refactor", - "release": "patch" - }, - { - "tag": "security", - "release": "patch" - }, - { - "tag": "style", - "release": "patch" - }, - { - "tag": "test", - "release": false - } + { "type": "breaking", "release": "major" }, + { "type": "chore", "release": false }, + { "type": "ci", "release": false }, + { "type": "docs", "scope": "README.md", "release": "patch" }, + { "type": "docs", "release": false }, + { "type": "feat", "release": "minor" }, + { "type": "fix", "release": "patch" }, + { "type": "refactor", "release": "patch" }, + { "type": "security", "release": "patch" }, + { "type": "style", "release": "patch" }, + { "type": "test", "release": false } ] } ],