@@ -27,14 +27,18 @@ jobs:
2727 - name : Versions
2828 run : |
2929 python3 --version
30- - uses : actions/checkout@v1
30+ - name : Checkout Current Repo
31+ uses : actions/checkout@v1
3132 with :
3233 submodules : true
34+ - name : Checkout tools repo
35+ uses : actions/checkout@v2
36+ with :
37+ repository : adafruit/actions-ci-circuitpython-libs
38+ path : actions-ci
3339 - name : Install deps
3440 run : |
35- sudo apt-get install -y gettext
36- pip install -r requirements.txt
37- pip install circuitpython-build-tools Sphinx sphinx-rtd-theme
41+ source actions-ci/install.sh
3842 - name : Build assets
3943 run : circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
4044 - name : Upload Release Assets
@@ -53,15 +57,22 @@ jobs:
5357 runs-on : ubuntu-latest
5458 steps :
5559 - uses : actions/checkout@v1
60+ - name : Check For setup.py
61+ id : need-pypi
62+ run : |
63+ echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
5664 - name : Set up Python
65+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
5766 uses : actions/setup-python@v1
5867 with :
5968 python-version : ' 3.x'
6069 - name : Install dependencies
70+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
6171 run : |
6272 python -m pip install --upgrade pip
6373 pip install setuptools wheel twine
6474 - name : Build and publish
75+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
6576 env :
6677 TWINE_USERNAME : ${{ secrets.pypi_username }}
6778 TWINE_PASSWORD : ${{ secrets.pypi_password }}
0 commit comments