File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,17 @@ concurrency:
1111 cancel-in-progress : true
1212
1313jobs :
14+ # Make sure commit messages follow the conventional commits convention:
15+ # https://www.conventionalcommits.org
16+ commitlint :
17+ name : Lint Commit Messages
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v3
21+ with :
22+ fetch-depth : 0
23+ - uses : wagoid/commitlint-github-action@v5.3.0
24+
1425 test :
1526 strategy :
1627 fail-fast : false
3647 - name : Test with Pytest
3748 run : poetry run pytest
3849 shell : bash
50+ release :
51+ runs-on : ubuntu-latest
52+ environment : release
53+ if : github.ref == 'refs/heads/main'
54+ needs :
55+ - test
56+
57+ steps :
58+ - uses : actions/checkout@v3
59+ with :
60+ fetch-depth : 0
61+
62+ # Run semantic release:
63+ # - Update CHANGELOG.md
64+ # - Update version in code
65+ # - Create git tag
66+ # - Create GitHub release
67+ # - Publish to PyPI
68+ - name : Python Semantic Release
69+ uses : relekang/python-semantic-release@v7.33.2
70+ with :
71+ github_token : ${{ secrets.GH_TOKEN }}
72+ pypi_token : ${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change @@ -28,3 +28,8 @@ build-backend = "poetry.core.masonry.api"
2828pytest-asyncio = " *"
2929pytest = " *"
3030
31+ [tool .semantic_release ]
32+ branch = " main"
33+ version_toml = " pyproject.toml:tool.poetry.version"
34+ version_variable = " setup.py:__version__"
35+ build_command = " pip install poetry && poetry build"
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ # This is a shim to allow GitHub to detect the package, build is done with poetry
4+ # Taken from https://github.com/Textualize/rich
5+
6+ import setuptools
7+
8+ __version__ = "0.1.10"
9+
10+ if __name__ == "__main__" :
11+ setuptools .setup (name = "roborock" , version = __version__ )
You can’t perform that action at this time.
0 commit comments