@@ -14,99 +14,84 @@ jobs:
1414 lint :
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : actions/checkout@v3
18- - uses : actions/setup-python@v3
17+ - uses : actions/checkout@v4
18+ - uses : actions/setup-python@v5
1919 with :
20- python-version : " 3.9 "
21- - uses : pre-commit/action@v2 .0.3
20+ python-version : " 3.11 "
21+ - uses : pre-commit/action@v3 .0.1
2222
2323 # Make sure commit messages follow the conventional commits convention:
2424 # https://www.conventionalcommits.org
2525 commitlint :
2626 name : Lint Commit Messages
2727 runs-on : ubuntu-latest
2828 steps :
29- - uses : actions/checkout@v3
29+ - uses : actions/checkout@v4
3030 with :
3131 fetch-depth : 0
32- - uses : wagoid/commitlint-github-action@v5
32+ - uses : wagoid/commitlint-github-action@v6.2.1
3333
3434 test :
3535 strategy :
3636 fail-fast : false
3737 matrix :
3838 python-version :
39- - " 3.9"
40- - " 3.10"
4139 - " 3.11"
4240 - " 3.12"
41+ - " 3.13"
4342 os :
4443 - ubuntu-latest
4544 runs-on : ${{ matrix.os }}
4645 steps :
47- - uses : actions/checkout@v3
46+ - uses : actions/checkout@v4
47+ - uses : snok/install-poetry@v1
4848 - name : Set up Python
49- uses : actions/setup-python@v3
49+ uses : actions/setup-python@v5
5050 with :
5151 python-version : ${{ matrix.python-version }}
52- - uses : snok/install- poetry@v1
52+ cache : " poetry"
5353 - name : Install Dependencies
5454 run : poetry install
5555 - name : Test with Pytest
5656 run : poetry run pytest --cov-report=xml
5757 - name : Upload coverage to Codecov
58- uses : codecov/codecov-action@v3
58+ uses : codecov/codecov-action@v5
5959 with :
6060 token : ${{ secrets.CODECOV_TOKEN }}
6161
6262 release :
6363 runs-on : ubuntu-latest
6464 environment : release
65- concurrency : release
66- permissions :
67- id-token : write
68- contents : write
6965 if : github.ref == 'refs/heads/main'
7066 needs :
7167 - test
7268 - lint
7369 - commitlint
70+ permissions :
71+ id-token : write
72+ contents : write
7473
7574 steps :
75+ - uses : actions/checkout@v4
76+ with :
77+ fetch-depth : 0
78+
7679 # Run semantic release:
7780 # - Update CHANGELOG.md
7881 # - Update version in code
7982 # - Create git tag
8083 # - Create GitHub release
81- # - Publish to PyPI
82- - uses : actions/checkout@v4
83- with :
84- fetch-depth : 0
85- ref : ${{ github.head_ref || github.ref_name }}
86-
87- # Do a dry run of PSR
88- - name : Test release
89- uses :
python-semantic-release/[email protected] 90- if : github.ref_name != 'main'
91- with :
92- root_options : --noop
93-
94- # On main branch: actual PSR + upload to PyPI & GitHub
95- - name : Release
96- uses :
python-semantic-release/[email protected] 84+ - name : Python Semantic Release
9785 id : release
98- if : github.ref_name == 'main'
86+ uses : python-semantic-release/[email protected] 9987 with :
10088 github_token : ${{ secrets.GITHUB_TOKEN }}
101-
102- - name : Publish package distributions to PyPI
89+ - name : Upload package to PyPI
10390 uses : pypa/gh-action-pypi-publish@release/v1
104- # NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
105- # See https://github.com/actions/runner/issues/1173
10691 if : steps.release.outputs.released == 'true'
107-
108- - name : Publish package distributions to GitHub Releases
109- uses : python-semantic-release/upload-to-gh-release@main
92+ - name : Upload Github Release Assets
93+ uses :
python-semantic-release/[email protected] 11094 if : steps.release.outputs.released == 'true'
11195 with :
11296 github_token : ${{ secrets.GITHUB_TOKEN }}
97+ tag : ${{ steps.release.outputs.tag }}
0 commit comments