diff --git a/.github/workflows/ci.yml b/.github/workflows/cicd.yml similarity index 57% rename from .github/workflows/ci.yml rename to .github/workflows/cicd.yml index b4d0c35..2ad1ebf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/cicd.yml @@ -39,3 +39,27 @@ jobs: run: make clean - name: Run tests run: make PYTHON3=python check + + # Build the binary wheel as well as the source tar + - name: Build Objects + run: | + pip install -q twine wheel + python setup.py sdist bdist_wheel + + # Ensure the objects were packaged correctly and there wasn't an issue with + # the compilation or packaging process. + - name: Check Objects + run: twine check dist/* + + # Upload the packages on all develop and main pipleines for test consumption + - name: Upload HTML Docs + uses: actions/upload-artifact@v2 + with: + name: packages + path: ./dist/ + + # If this commit is the result of a Git tag, push the wheel and tar packages + # to the PyPi registry + - name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags') + run: twine upload --repository-url https://upload.pypi.org/legacy/ -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing --verbose dist/*