File tree Expand file tree Collapse file tree 3 files changed +42
-19
lines changed Expand file tree Collapse file tree 3 files changed +42
-19
lines changed Original file line number Diff line number Diff line change 1212 pre-commit :
1313 runs-on : ubuntu-latest
1414 steps :
15- - uses : actions/checkout@v1
15+ - uses : actions/checkout@v2
1616 - uses : actions/setup-python@v1
1717 - uses : pre-commit/action@v2.0.0
Original file line number Diff line number Diff line change 1010
1111jobs :
1212 tests :
13+ name : ${{ matrix.os }} / ${{ matrix.python-version }}
1314 runs-on : ${{ matrix.os }}-latest
15+ continue-on-error : ${{ matrix.experimental }}
1416 strategy :
1517 matrix :
1618 os : [Ubuntu]
1719 python-version : [3.6, 3.7, 3.8, 3.9]
20+ experimental : [false]
21+ fail-fast : false
22+
1823 steps :
1924 - uses : actions/checkout@v2
2025 - uses : actions/setup-go@v2
3136
3237 - name : Install poetry
3338 shell : bash
34- run : |
35- pip install poetry
36-
37- - name : Upgrade pip
38- shell : bash
39- run : poetry run pip install --upgrade pip
39+ run : python -m pip install poetry
4040
4141 - name : Configure poetry
4242 shell : bash
Original file line number Diff line number Diff line change 88jobs :
99 release :
1010 runs-on : ubuntu-latest
11+
1112 steps :
12- - uses : actions/checkout@v2
13- - name : Set up Python 3.8
13+ - name : Checkout code
14+ uses : actions/checkout@v2
15+
16+ - name : Get tag
17+ id : tag
18+ run : echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
19+
20+ - name : Set up Python 3.9
1421 uses : actions/setup-python@v2
1522 with :
16- python-version : 3.8
23+ python-version : " 3.9"
24+
1725 - name : Install dependencies
26+ run : python -m pip install poetry
27+
28+ - name : Update PATH
29+ run : echo "$HOME/.local/bin" >> $GITHUB_PATH
30+
31+ - name : Build project for distribution
32+ run : poetry build
33+
34+ - name : Check Version
35+ id : check-version
1836 run : |
19- python -m pip install --upgrade pip
20- python -m pip install poetry
21- - name : Configure pypi credentials
37+ [[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
38+ || echo ::set-output name=prerelease::true
39+
40+ - name : Create Release
41+ uses : ncipollo/release-action@v1
42+ with :
43+ artifacts : " dist/*"
44+ token : ${{ secrets.GITHUB_TOKEN }}
45+ draft : false
46+ prerelease : steps.check-version.outputs.prerelease == 'true'
47+
48+ - name : Publish to PyPI
2249 env :
23- PYPI_API_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
24- run : |
25- poetry config http-basic.pypi __token__ "$PYPI_API_TOKEN"
26- - name : Publish release to pypi
27- run : |
28- poetry publish --build
50+ POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_API_TOKEN }}
51+ run : poetry publish
You can’t perform that action at this time.
0 commit comments