Skip to content

Commit b64b3da

Browse files
Update publish.yml
1 parent 533c2ae commit b64b3da

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,26 @@ jobs:
3232
run: |
3333
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
3434
35+
- name: Regenerate lock file if needed
36+
run: |
37+
set -e
38+
if poetry check; then
39+
echo "Dependencies are consistent"
40+
else
41+
echo "Regenerating lock file..."
42+
poetry lock
43+
fi
44+
3545
- name: Install dependencies
36-
run: poetry install --no-dev
46+
run: poetry install --only main
3747

3848
- name: Run tests
3949
run: poetry run pytest
4050

4151
- name: Build and publish
52+
env:
53+
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
54+
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
4255
run: |
43-
set -e
4456
poetry build
4557
poetry publish

0 commit comments

Comments
 (0)