1
-
2
1
name : Release Actions
3
2
4
3
on :
@@ -28,14 +27,18 @@ jobs:
28
27
- name : Versions
29
28
run : |
30
29
python3 --version
31
- - uses : actions/checkout@v1
30
+ - name : Checkout Current Repo
31
+ uses : actions/checkout@v1
32
32
with :
33
33
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
34
39
- name : Install deps
35
40
run : |
36
- sudo apt-get install -y gettext
37
- pip install -r requirements.txt
38
- pip install circuitpython-build-tools Sphinx sphinx-rtd-theme
41
+ source actions-ci/install.sh
39
42
- name : Build assets
40
43
run : circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
41
44
- name : Upload Release Assets
@@ -54,19 +57,25 @@ jobs:
54
57
runs-on : ubuntu-latest
55
58
steps :
56
59
- 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' )
57
64
- name : Set up Python
65
+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
58
66
uses : actions/setup-python@v1
59
67
with :
60
68
python-version : ' 3.x'
61
69
- name : Install dependencies
70
+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
62
71
run : |
63
72
python -m pip install --upgrade pip
64
73
pip install setuptools wheel twine
65
74
- name : Build and publish
75
+ if : contains(steps.need-pypi.outputs.setup-py, 'setup.py')
66
76
env :
67
77
TWINE_USERNAME : ${{ secrets.pypi_username }}
68
78
TWINE_PASSWORD : ${{ secrets.pypi_password }}
69
79
run : |
70
80
python setup.py sdist
71
81
twine upload dist/*
72
-
0 commit comments