Skip to content

Commit 08e752d

Browse files
committed
Fix for publish-pypi workflow
1 parent 5008a0b commit 08e752d

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
env:
1111
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1212
steps:
13-
- uses: actions/checkout@master
13+
- uses: actions/checkout@v3
1414

1515
- name: get version from tag
1616
id: get_version
@@ -26,31 +26,18 @@ jobs:
2626
key: "tool.poetry.version"
2727
value: "${{ steps.get_version.outputs.VERSION }}"
2828

29-
- name: Set up Python 3.9
30-
uses: actions/setup-python@v3
29+
- name: Set up Python
30+
uses: actions/setup-python@v4
3131
with:
3232
python-version: 3.9
3333

34-
- name: Install Poetry
35-
uses: dschep/install-poetry-action@v1.3
36-
37-
- name: Cache Poetry virtualenv
38-
uses: actions/cache@v3
39-
id: cache
40-
with:
41-
path: ~/.virtualenvs
42-
key: poetry-${{ hashFiles('**/poetry.lock') }}
43-
restore-keys: |
44-
poetry-${{ hashFiles('**/poetry.lock') }}
45-
46-
- name: Set Poetry config
34+
- name: Prepare environment
4735
run: |
48-
poetry config virtualenvs.in-project false
49-
poetry config virtualenvs.path ~/.virtualenvs
50-
51-
- name: Install Dependencies
52-
run: poetry install
53-
if: steps.cache.outputs.cache-hit != 'true'
36+
python -m venv .venv
37+
source .venv/bin/activate
38+
pip install -U setuptools pip poetry==1.3.2 tox-poetry
39+
poetry config virtualenvs.create false
40+
poetry install
5441
5542
- name: Publish to PyPI
5643
if: github.event_name == 'release'

0 commit comments

Comments
 (0)