Skip to content

Commit

Permalink
chore: Github Actions semantic release
Browse files Browse the repository at this point in the history
chore: GitHub actions
  • Loading branch information
qaldak authored Nov 17, 2023
2 parents f8c4480 + ffb9670 commit 26895a6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
contents: write

steps:
- name: Check triggered by new release
run: |
if [[ ${{ github.event.head_commit.message }} =~ ^\d+\.\d+\.\d+ ]]; then
echo "Workflow triggered by new realease"
else
echo "Commit message does not match pattern"
fi
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -37,6 +45,7 @@ jobs:
pip install -r requirements.txt

- name: Python Semantic Release
if: ${{ ! startsWith(github.event.head_commit.message, '[0-9]+.[0-9]+.[0-9]+') }}
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions semantic-release.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tool.semantic_release.branches.main]

[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build",
"chore",
"ci",
"docs",
"feat",
"feature",
"fix",
"perf",
"style",
"refactor",
"test",
]
major_tags = ["feat!", "breaking change", "BREAKING CHANGE"]
minor_tags = ["feat", "feature"]
patch_tags = ["fix", "perf", "refactor"]

0 comments on commit 26895a6

Please sign in to comment.