File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ 3.10
Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+
3+ on :
4+ release :
5+ types :
6+ - published
7+
8+ jobs :
9+ publish :
10+ name : Publish to PyPI
11+ runs-on : ubuntu-latest
12+ if : " startsWith(github.event.release.tag_name, 'v')"
13+ steps :
14+ - uses : actions/checkout@v3
15+
16+ - uses : actions/setup-python@v3
17+ with :
18+ python-version-file : .github/workflows/.python-version
19+
20+ - name : Install build dependencies
21+ run : pip install build
22+
23+ - name : Build package
24+ run : python -m build
25+
26+ - name : Publish to Test PyPI
27+ uses : pypa/gh-action-pypi-publish@release/v1.5
28+ if : " github.event.release.prerelease"
29+ with :
30+ username : __token__
31+ password : ${{ secrets.PYPI_TEST_API_TOKEN }}
32+
33+ - name : Publish to PyPI
34+ uses : pypa/gh-action-pypi-publish@release/v1.5
35+ if : " !github.event.release.prerelease"
36+ with :
37+ username : __token__
38+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -14,14 +14,17 @@ jobs:
1414
1515 steps :
1616 - uses : actions/checkout@v3
17+
1718 - name : Set up Python ${{ matrix.python-version }}
1819 uses : actions/setup-python@v3
1920 with :
2021 python-version : ${{ matrix.python-version }}
22+
2123 - name : Install dependencies
2224 run : |
2325 python -m pip install --upgrade pip
2426 pip install -r tests/requirements.txt
2527 pip install -e .
28+
2629 - name : Run tests
2730 run : ./tests/run.sh
You can’t perform that action at this time.
0 commit comments