Skip to content

Commit ed08de3

Browse files
authored
fix: releases depends on test, config pyproject.toml for semantic release (#2)
1 parent 6a248e0 commit ed08de3

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

.github/workflows/tests.yml renamed to .github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,21 @@ jobs:
5353

5454
- name: Run tests
5555
run: poetry run pytest
56+
57+
release:
58+
if: github.ref == 'refs/heads/main'
59+
runs-on: ubuntu-latest
60+
concurrency: release
61+
permissions:
62+
id-token: write
63+
contents: write
64+
65+
steps:
66+
- uses: actions/checkout@v3
67+
with:
68+
fetch-depth: 0
69+
70+
- name: Python Semantic Release
71+
uses: python-semantic-release/python-semantic-release@master
72+
with:
73+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ pytest = "^8.1.1"
1515
[build-system]
1616
requires = ["poetry-core"]
1717
build-backend = "poetry.core.masonry.api"
18+
19+
[tool.semantic_release]
20+
version_toml = ["pyproject.toml:tool.poetry.version"]

0 commit comments

Comments
 (0)