File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : ci
2- on : [push, pull_request]
1+ name : CI
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+ push :
7+ branches : [main]
8+
39jobs :
410 lint :
511 runs-on : ubuntu-latest
2531 - run : pip install -e ".[dev]"
2632 - name : Test
2733 run : pytest --cov=keito --cov-report=xml
28-
29- publish :
30- needs : [lint, test]
31- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
32- runs-on : ubuntu-latest
33- steps :
34- - uses : actions/checkout@v4
35- - uses : actions/setup-python@v5
36- with :
37- python-version : " 3.12"
38- - run : pip install build twine
39- - name : Build
40- run : python -m build
41- - name : Publish to PyPI
42- run : twine upload dist/*
43- env :
44- TWINE_USERNAME : __token__
45- TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Release Please
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ permissions :
8+ contents : write
9+ pull-requests : write
10+
11+ jobs :
12+ release-please :
13+ runs-on : ubuntu-latest
14+ outputs :
15+ release_created : ${{ steps.release.outputs.release_created }}
16+ tag_name : ${{ steps.release.outputs.tag_name }}
17+ steps :
18+ - uses : googleapis/release-please-action@v4
19+ id : release
20+ with :
21+ release-type : python
22+
23+ publish :
24+ needs : release-please
25+ if : ${{ needs.release-please.outputs.release_created }}
26+ runs-on : ubuntu-latest
27+ permissions :
28+ contents : read
29+ id-token : write
30+ steps :
31+ - uses : actions/checkout@v4
32+ - uses : actions/setup-python@v5
33+ with :
34+ python-version : " 3.12"
35+ - run : pip install -e ".[dev]"
36+ - name : Lint
37+ run : ruff check .
38+ - name : Test
39+ run : pytest
40+ - run : pip install build twine
41+ - name : Build
42+ run : python -m build
43+ - name : Publish to PyPI
44+ run : twine upload dist/*
45+ env :
46+ TWINE_USERNAME : __token__
47+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments