Skip to content

Commit 8cb94e2

Browse files
authored
v0.14.1
version 0.14.1
2 parents 2a4f657 + e8d2926 commit 8cb94e2

20 files changed

+2830
-253
lines changed

.github/workflows/pypi.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,31 @@ jobs:
88
name: Build and publish package to PyPI
99
runs-on: ubuntu-18.04
1010
steps:
11-
- uses: actions/checkout@master
12-
- name: Set up Python 3.7
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
1313
uses: actions/setup-python@v1
1414
with:
15-
python-version: 3.7
16-
- name: Install wheel
17-
run: python3 -m pip install --user --upgrade setuptools wheel
18-
- name: Build a binary wheel and a source tarball
19-
run: python3 setup.py sdist bdist_wheel
20-
- name: Publish distribution to PyPI
21-
if: startsWith(github.ref, 'refs/tags')
22-
uses: pypa/gh-action-pypi-publish@master
15+
python-version: "3.7"
16+
- name: Install poetry
17+
run: |
18+
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
19+
python get-poetry.py -y
20+
- name: Configure poetry
21+
run: $HOME/.poetry/bin/poetry config virtualenvs.in-project true
22+
- name: Set up cache
23+
uses: actions/cache@v1
24+
id: cache
2325
with:
24-
password: ${{ secrets.pypi_password }}
26+
path: .venv
27+
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
28+
- name: Ensure cache is healthy
29+
if: steps.cache.outputs.cache-hit == 'true'
30+
run: $HOME/.poetry/bin/poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
31+
- name: Install Dependencies
32+
run: $HOME/.poetry/bin/poetry install
33+
- name: Publish
34+
env:
35+
PYPI_TOKEN: ${{ secrets.pypi_password }}
36+
run: |
37+
$HOME/.poetry/bin/poetry config pypi-token.pypi $PYPI_TOKEN
38+
$HOME/.poetry/bin/poetry publish --build

0 commit comments

Comments
 (0)