File tree Expand file tree Collapse file tree 3 files changed +38
-28
lines changed
Expand file tree Collapse file tree 3 files changed +38
-28
lines changed Original file line number Diff line number Diff line change 3838 - name : Test with pytest
3939 run : |
4040 pytest --log-cli-level=debug
41+
42+ release :
43+ runs-on : ubuntu-latest
44+ concurrency : release
45+ environment : python-semantic-release
46+ if : github.ref == 'refs/heads/main'
47+ needs : [prek, pytest]
48+ permissions :
49+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
50+ steps :
51+ - name : Generate Token
52+ id : app-token
53+ uses : actions/create-github-app-token@v2.2.1
54+ with :
55+ app-id : ${{ secrets.PSR_APP_ID }}
56+ private-key : ${{ secrets.PSR_PRIVATE_KEY }}
57+ - uses : actions/checkout@v6.0.2
58+ with :
59+ fetch-depth : 0
60+ persist-credentials : false
61+ - name : Set up Python
62+ uses : actions/setup-python@v5
63+ with :
64+ python-version : " 3.13"
65+ - name : Python Semantic Release
66+ id : release
67+ uses : python-semantic-release/python-semantic-release@v10.5.3
68+ with :
69+ github_token : ${{ steps.app-token.outputs.token }}
70+ changelog : false
71+ - name : Publish package PyPI
72+ uses : pypa/gh-action-pypi-publish@release/v1
73+ if : steps.release.outputs.released == 'true'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ select = [
3636 # isort
3737 " I" ,]
3838
39-
4039[tool .ruff .lint .mccabe ]
4140max-complexity = 25
4241
@@ -45,3 +44,8 @@ typeCheckingMode = "standard"
4544
4645[project .optional-dependencies ]
4746dev = [" pytest" , " prek" ]
47+
48+ [tool .semantic_release ]
49+ version_toml = [" pyproject.toml:project.version" ]
50+ build_command = " pip install build==1.4.0 && python -m build"
51+ tag_format = " {version}"
You can’t perform that action at this time.
0 commit comments