Skip to content

Commit 7912081

Browse files
authored
Merge pull request #1 from adafruit/dherrada-patch-1
Moved repository from Travis to GitHub Actions
2 parents 931229f + 9b70b84 commit 7912081

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Build CI
32

43
on: [pull_request, push]
@@ -26,15 +25,18 @@ jobs:
2625
- name: Versions
2726
run: |
2827
python3 --version
29-
- uses: actions/checkout@v1
28+
- name: Checkout Current Repo
29+
uses: actions/checkout@v1
3030
with:
3131
submodules: true
32+
- name: Checkout tools repo
33+
uses: actions/checkout@v2
34+
with:
35+
repository: adafruit/actions-ci-circuitpython-libs
36+
path: actions-ci
3237
- name: Install deps
3338
run: |
34-
sudo apt-get install -y gettext
35-
pip install -r requirements.txt
36-
pip install circuitpython-build-tools Sphinx sphinx-rtd-theme
37-
pip install --force-reinstall pylint==1.9.2
39+
source actions-ci/install.sh
3840
- name: Library version
3941
run: git describe --dirty --always --tags
4042
- name: PyLint
@@ -46,4 +48,3 @@ jobs:
4648
- name: Build docs
4749
working-directory: docs
4850
run: sphinx-build -E -W -b html . _build/html
49-

.github/workflows/release.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Release Actions
32

43
on:
@@ -28,14 +27,18 @@ jobs:
2827
- name: Versions
2928
run: |
3029
python3 --version
31-
- uses: actions/checkout@v1
30+
- name: Checkout Current Repo
31+
uses: actions/checkout@v1
3232
with:
3333
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
3439
- name: Install deps
3540
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
3942
- name: Build assets
4043
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
4144
- name: Upload Release Assets
@@ -54,19 +57,25 @@ jobs:
5457
runs-on: ubuntu-latest
5558
steps:
5659
- 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' )
5764
- name: Set up Python
65+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
5866
uses: actions/setup-python@v1
5967
with:
6068
python-version: '3.x'
6169
- name: Install dependencies
70+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
6271
run: |
6372
python -m pip install --upgrade pip
6473
pip install setuptools wheel twine
6574
- name: Build and publish
75+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
6676
env:
6777
TWINE_USERNAME: ${{ secrets.pypi_username }}
6878
TWINE_PASSWORD: ${{ secrets.pypi_password }}
6979
run: |
7080
python setup.py sdist
7181
twine upload dist/*
72-

0 commit comments

Comments
 (0)