Skip to content

Commit 74cf82c

Browse files
committed
Use Poetry to install, build, and publish in the CD workflow
1 parent ac4095a commit 74cf82c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/cd.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ jobs:
2020
uses: actions/setup-python@v4
2121
with:
2222
python-version: '3.8.x'
23-
- name: Install build
24-
run: pip install build
23+
- name: Install Poetry
24+
uses: abatilo/actions-poetry@v2.3.0
25+
with:
26+
poetry-version: '1.4.1'
27+
- name: Install dependencies
28+
run: poetry install --no-dev
2529
- name: Build project
26-
run: python -m build
30+
run: poetry build
2731
- name: Upload wheel
2832
uses: actions/upload-artifact@v3
2933
with:
@@ -37,7 +41,6 @@ jobs:
3741
files: |
3842
dist/*.whl
3943
- name: Publish to PyPI
40-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
41-
with:
42-
user: __token__
43-
password: ${{ secrets.PYPI_API_TOKEN }}
44+
env:
45+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
46+
run: poetry publish

0 commit comments

Comments
 (0)