Merge pull request #17 from HideyoshiNakazone/fixes-ci-cd

Fixes CI/CD
This commit is contained in:
2024-06-24 01:38:45 -03:00
committed by GitHub
2 changed files with 16 additions and 11 deletions

View File

@@ -25,15 +25,17 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip poetry python -m pip install --upgrade pip poetry
poetry self add "poetry-dynamic-versioning[plugin]"
if [ -f pyproject.toml ]; then poetry install; fi if [ -f pyproject.toml ]; then poetry install; fi
- name: Build Cython Code - name: Build Python Package
run: | run: |
poetry build -f sdist poetry build -f sdist
poetry install poetry install
- name: Test with unittest echo "Builded yoshi-seals - $(poetry version)"
- name: Run unittest
run: | run: |
poetry run python -m unittest poetry run python -m unittest
- name: Build and Upload Python Package - name: Upload Python Package
run: | run: |
poetry config repositories.test-pypi https://test.pypi.org/legacy/ poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{secrets.PYPI_TEST_TOKEN}} poetry config pypi-token.test-pypi ${{secrets.PYPI_TEST_TOKEN}}

View File

@@ -25,15 +25,18 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip poetry python -m pip install --upgrade pip poetry
poetry self add "poetry-dynamic-versioning[plugin]"
if [ -f pyproject.toml ]; then poetry install; fi if [ -f pyproject.toml ]; then poetry install; fi
- name: Build Cython Code - name: Build Python Package
run: | run: |
poetry build -f sdist poetry build -f sdist
# - name: Test with unittest poetry install
# run: | echo "Builded yoshi-seals - $(poetry version)"
# poetry run python -m unittest - name: Run unittest
- name: Build and Upload Python Package
run: | run: |
poetry config repositories.pypi https://pypi.org/legacy/ poetry run python -m unittest
poetry config pypi-token.pypi ${{secrets.PYPI_TOKEN}} - name: Upload Python Package
poetry publish --repository pypi run: |
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{secrets.PYPI_TOKEN}}
poetry publish --repository test-pypi