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 } ] } ],