Skip to content

Commit

Permalink
chore: Add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlushkin committed Aug 22, 2024
1 parent a4b55f9 commit 7ddbd61
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install semantic-release poetry-dynamic-versioning
semantic-release publish
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ ruff = "^0.6.2"
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.semantic_release]
version_source = "tag"
version_variable = "pyproject.toml:version"
commit_parser = "semantic_release.history.parser:AngularParser"

[tool.semantic_release]
upload_to_pypi = false
upload_to_release = true

[tool.poetry-dynamic-versioning]
enable = true

[tool.ruff]
line-length = 120

Expand Down

0 comments on commit 7ddbd61

Please sign in to comment.