chore: рефакторит Github Actions workflows

This commit is contained in:
Maxim Slipenko 2023-09-24 12:06:13 +03:00
parent 4ae759a3de
commit b5c5f59e0f
3 changed files with 44 additions and 45 deletions

View File

@ -13,11 +13,9 @@ jobs:
name: Проверка PR заголовка name: Проверка PR заголовка
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Please look up the latest version from - uses: amannn/action-semantic-pull-request@v5
# https://github.com/amannn/action-semantic-pull-request/releases
- uses: amannn/action-semantic-pull-request@v3.4.6
env: env:
GITHUB_TOKEN: ${{ secrets.TERRAFORM_YANDEX_COMPUTE_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
# Configure which types are allowed. # Configure which types are allowed.
# Default: https://github.com/commitizen/conventional-commit-types # Default: https://github.com/commitizen/conventional-commit-types

30
.github/workflows/release.yml vendored Normal file
View File

@ -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 }}

View File

@ -7,48 +7,19 @@
[ [
"@semantic-release/commit-analyzer", "@semantic-release/commit-analyzer",
{ {
"preset": "ESLint", "preset": "angular",
"releaseRules": [ "releaseRules": [
{ { "type": "breaking", "release": "major" },
"tag": "breaking", { "type": "chore", "release": false },
"release": "major" { "type": "ci", "release": false },
}, { "type": "docs", "scope": "README.md", "release": "patch" },
{ { "type": "docs", "release": false },
"tag": "chore", { "type": "feat", "release": "minor" },
"release": false { "type": "fix", "release": "patch" },
}, { "type": "refactor", "release": "patch" },
{ { "type": "security", "release": "patch" },
"tag": "ci", { "type": "style", "release": "patch" },
"release": false { "type": "test", "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
}
] ]
} }
], ],