Skip to content

Commit 5a22a0f

Browse files
committed
upload stubs step in actions
1 parent bc014ce commit 5a22a0f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
run: |
4444
gcc --version
4545
python3 --version
46+
- name: Check For setup.py
47+
id: need-pypi
48+
run: |
49+
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
4650
- name: New boards check
4751
run: python3 -u ci_new_boards_check.py
4852
working-directory: tools
@@ -54,6 +58,19 @@ jobs:
5458
with:
5559
name: stubs
5660
path: circuitpython-stubs*
61+
- name: Install pypi dependencies
62+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
63+
run: |
64+
python -m pip install --upgrade pip
65+
pip install setuptools wheel twine
66+
- name: Publish stubs
67+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
68+
env:
69+
TWINE_USERNAME: ${{ secrets.pypi_username }}
70+
TWINE_PASSWORD: ${{ secrets.pypi_password }}
71+
run: |
72+
python setup.py sdist
73+
twine upload dist/*
5774
- name: Test Documentation Build (HTML)
5875
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
5976
- uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)