1 # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2 # SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries
4 # SPDX-License-Identifier: MIT
8 on: [pull_request, push]
12 runs-on: ubuntu-latest
14 - name: Dump GitHub context
16 GITHUB_CONTEXT: ${{ toJson(github) }}
17 run: echo "$GITHUB_CONTEXT"
18 - name: Translate Repo Name For Build Tools filename_prefix
21 echo ::set-output name=repo-name::Adafruit-Blinka-displayio
22 - name: Set up Python 3.x
23 uses: actions/setup-python@v2
29 - name: Checkout Current Repo
30 uses: actions/checkout@v1
33 - name: Checkout tools repo
34 uses: actions/checkout@v2
36 repository: adafruit/actions-ci-circuitpython-libs
38 - name: Install dependencies
39 # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
41 source actions-ci/install.sh
42 - name: Pip install Sphinx, pre-commit
44 pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
45 - name: Library version
46 run: git describe --dirty --always --tags
47 - name: Setup problem matchers
48 uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
49 - name: Pre-commit hooks
51 pre-commit run --all-files
52 - name: Archive bundles
53 uses: actions/upload-artifact@v2
56 path: ${{ github.workspace }}/bundles/
58 working-directory: docs
59 run: sphinx-build -E -W -b html . _build/html
60 - name: Check For pyproject.toml
63 echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
64 - name: Build Python package
65 if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
67 pip install --upgrade build twine
68 for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
69 sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;