@@ -152,15 +152,36 @@ jobs:
152152 uses : actions/setup-python@v2
153153 with :
154154 python-version : 3.9
155- - name : Install dependencies
156- run :
157- python -m pip install -U pip wheel twine
158- - name : Make dists
159- run :
160- python setup.py sdist bdist_wheel
161- - name : PyPI upload
155+
156+ - name : Install Poetry
157+ uses : snok/install-poetry@v1
158+ with :
159+ virtualenvs-create : true
160+ virtualenvs-in-project : true
161+ installer-parallel : true
162+ # ----------------------------------------------
163+ # load cached venv if cache exists
164+ # ----------------------------------------------
165+ - name : Load cached venv
166+ id : cached-poetry-dependencies
167+ uses : actions/cache@v2
168+ with :
169+ path : .venv
170+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
171+ # ----------------------------------------------
172+ # install dependencies if cache does not exist
173+ # ----------------------------------------------
174+ - name : Install dependencies
175+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
176+ run : poetry install --no-interaction --no-root
177+ # ----------------------------------------------
178+ # install your root project, if required
179+ # ----------------------------------------------
180+ - name : Install library
181+ run : poetry install --no-interaction
182+ - name : PyPI upload
162183 env :
163184 TWINE_USERNAME : __token__
164185 TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
165186 run : |
166- twine upload dist/*
187+ make upload
0 commit comments