@@ -10,26 +10,50 @@ jobs:
1010
1111 steps :
1212 - uses : actions/checkout@v3
13+ with :
14+ fetch-depth : 0 # Fetch all history for version tagging
1315
1416 - name : Set up Python
1517 uses : actions/setup-python@v4
1618 with :
17- python-version : ' 3.x '
19+ python-version : ' 3.10 '
1820
21+ - name : Install system dependencies
22+ run : |
23+ sudo apt-get update
24+ sudo apt-get install -y python3-venv
25+
1926 - name : Install Poetry
20- uses : snok/install-poetry@v1
21- with :
22- version : 1.5.1
23- virtualenvs-create : true
24- virtualenvs-in-project : true
27+ run : |
28+ pip install "poetry==1.5.1"
29+ echo "$(python -m site --user-base)/bin" >> $GITHUB_PATH
30+
31+ - name : Configure Poetry
32+ run : |
33+ poetry config virtualenvs.create true
34+ poetry config virtualenvs.in-project true
35+ poetry config --list
36+ poetry --version
2537
2638 - name : Install dependencies
2739 run : |
28- poetry install --no-dev --no-interaction --no-ansi
40+ # Generate lock file if it doesn't exist
41+ if [ ! -f poetry.lock ]; then
42+ echo "No poetry.lock found, generating one..."
43+ poetry lock --no-update
44+ fi
45+
46+ # Install dependencies
47+ poetry install --no-dev --no-interaction --no-ansi -v
48+ poetry env info
2949
3050 - name : Build and publish
3151 env :
3252 PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
3353 run : |
54+ # Configure PyPI token
3455 poetry config pypi-token.pypi $PYPI_TOKEN
35- poetry publish --build
56+
57+ # Build and publish
58+ poetry build -v
59+ poetry publish --no-interaction -v
0 commit comments