diff --git a/.github/workflows/deploy-job.yml b/.github/workflows/deploy-job.yml index 0882600..4a65d52 100644 --- a/.github/workflows/deploy-job.yml +++ b/.github/workflows/deploy-job.yml @@ -54,12 +54,31 @@ jobs: python3 -m pytest -sr tests/test_c*.py deploy: runs-on: ubuntu-latest - needs: test if: github.ref == 'refs/heads/main' + needs: test steps: - uses: actions/checkout@v3 + - name: Verify Changed files + uses: tj-actions/verify-changed-files@v16 + id: verify-changed-files + with: + files: | + src/**/*.py + setup.cfg - name: Download artifacts + if: steps.verify-changed-files.outputs.files_changed == 'true' uses: actions/download-artifact@v3 with: name: built-artifacts path: dist + - name: Publish package to Test PyPI + if: steps.verify-changed-files.outputs.files_changed == 'true' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ + - name: Publish package to PyPI + if: steps.verify-changed-files.outputs.files_changed == 'true' + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index f62479d..c0e35d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # gods_eye changelog +## 1.0.6 +- Add pipeline. + Add deploy to PyPI. + Add tests and code check. + ## 1.0.5 - Pylint check code style diff --git a/setup.cfg b/setup.cfg index 8d4feca..3bec01a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = gods_eye -version = 1.0.5 +version = 1.0.6 author = Pavel Dat author_email = dats.pavel1999@gmail.com description = A set of tools which should be used in Gods Eye