Skip to content

Commit 4617cf4

Browse files
Merge pull request #48 from kchason/pypi-publish
Automated PyPi Publish
2 parents 16001f6 + 0c8066a commit 4617cf4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml renamed to .github/workflows/cicd.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,27 @@ jobs:
3939
run: make clean
4040
- name: Run tests
4141
run: make PYTHON3=python check
42+
43+
# Build the binary wheel as well as the source tar
44+
- name: Build Objects
45+
run: |
46+
pip install -q twine wheel
47+
python setup.py sdist bdist_wheel
48+
49+
# Ensure the objects were packaged correctly and there wasn't an issue with
50+
# the compilation or packaging process.
51+
- name: Check Objects
52+
run: twine check dist/*
53+
54+
# Upload the packages on all develop and main pipleines for test consumption
55+
- name: Upload HTML Docs
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: packages
59+
path: ./dist/
60+
61+
# If this commit is the result of a Git tag, push the wheel and tar packages
62+
# to the PyPi registry
63+
- name: Publish to PyPI
64+
if: startsWith(github.ref, 'refs/tags')
65+
run: twine upload --repository-url https://upload.pypi.org/legacy/ -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing --verbose dist/*

0 commit comments

Comments
 (0)