1919 fail-fast : false
2020 matrix :
2121 os : [ubuntu-latest]
22- python-version : ["3.8 ", "3.9 ", "3.10 ", "3.11 ", "3.12 "]
22+ python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12 ", "3.13 "]
2323 steps :
2424 - uses : actions/checkout@v3
2525 - name : Set up Python ${{ matrix.python-version }}
3131 - name : Install ${{ env.package }}
3232 run : |
3333 python -m pip install --upgrade pip
34- python -m pip install pytest pytest-cov pytest-pythonpath coverage
34+ python -m pip install pytest pytest-cov coverage
3535 pip install -r requirements.txt
3636 pip install .
3737 - name : Test ${{ env.package }} with pytest
@@ -47,13 +47,13 @@ jobs:
4747 - name : Set up Python ${{ matrix.python-version }}
4848 uses : actions/setup-python@v4
4949 with :
50- python-version : " 3.10 "
50+ python-version : " 3.12 "
5151 - name : Install pandoc
5252 run : sudo apt-get install -y pandoc notification-daemon
5353 - name : Install ${{ env.package }}
5454 run : |
5555 python -m pip install --upgrade pip
56- python -m pip install pytest pytest-cov pytest-pythonpath
56+ python -m pip install pytest pytest-cov
5757 pip install -r requirements.txt
5858 pip install .
5959 - name : Make coverage badge for ${{ env.package }}
7979 with :
8080 github_token : ${{ secrets.github_token }}
8181 branch : ${{ github.ref }}
82+ deploy :
83+ runs-on : ubuntu-latest
84+ needs : coverage
85+ steps :
86+ - uses : actions/checkout@v3
87+ with :
88+ fetch-depth : 0
89+ - name : Check for version change
90+ uses : dorny/paths-filter@v2
91+ id : filter
92+ with :
93+ filters : |
94+ version:
95+ - '**/VERSION.txt'
96+ - if : steps.filter.outputs.version == 'true'
97+ name : Cleanup README
98+ run : |
99+ sed -ri 's/^(##*)\s*:.*:\s*/\1 /g' README.md
100+ awk '{if (match($0,"## Supporters")) exit; print}' README.md > README
101+ mv -f README README.md
102+ - if : steps.filter.outputs.version == 'true'
103+ name : Build ${{ env.package }} package
104+ run : python3 -m pip install --upgrade build && python3 -m build
105+ - if : steps.filter.outputs.version == 'true'
106+ name : Upload ${{ env.package }} to PyPi
107+ uses : pypa/gh-action-pypi-publish@release/v1
108+ with :
109+ password : ${{ secrets.PYPI_API_TOKEN }}
110+ verbose : true
111+ verify_metadata : false
0 commit comments