Initial Poetry Migration

This commit is contained in:
2024-06-24 04:00:33 -03:00
parent b5b3b47937
commit f41f1022ce
8 changed files with 385 additions and 616 deletions

View File

@@ -18,20 +18,31 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.8"
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip pipenv
if [ -f Pipfile ]; then pipenv install; fi
- name: Test with unittest
python -m pip install --upgrade pip poetry
poetry self add "poetry-dynamic-versioning[plugin]"
if [ -f pyproject.toml ]; then poetry install; fi
- name: Configure PyPI
run: |
pipenv run python -m unittest
- name: Build Pip Packge
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{secrets.PYPI_TEST_TOKEN}}
- name: Build Python Package
run: |
pipenv run VERSION_SUFIX=${GITHUB_RUN_ID} python setup.py sdist bdist_wheel
- name: Upload Pip Packge
poetry build -f sdist
poetry install
echo "Builded yoshi-seals - $(poetry version)"
- name: Run unittest
run: |
pipenv run TWINE_USERNAME=${{secrets.PYPI_USER}} TWINE_PASSWORD=${{secrets.PYPI_TEST_TOKEN}} python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
poetry run python -m unittest
- name: Upload Python Package
run: |
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{secrets.PYPI_TEST_TOKEN}}
poetry publish --repository test-pypi