1 # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
3 # SPDX-License-Identifier: Unlicense
6 on: [pull_request, push]
10 runs-on: ubuntu-latest
12 - name: Dump GitHub context
14 GITHUB_CONTEXT: ${{ toJson(github) }}
15 run: echo "$GITHUB_CONTEXT"
16 - name: Translate Repo Name For Build Tools filename_prefix
18 run: echo "repo-name=Adafruit-Blinka" >> $GITHUB_OUTPUT
19 - name: Set up Python 3.8
20 uses: actions/setup-python@v4
26 - name: Checkout Current Repo
27 uses: actions/checkout@v3
30 - name: Checkout tools repo
31 uses: actions/checkout@v3
33 repository: adafruit/actions-ci-circuitpython-libs
35 - name: Install dependencies
36 # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
38 source actions-ci/install.sh
39 - name: Pip install Sphinx, pre-commit
41 pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
42 - name: Library version
43 run: git describe --dirty --always --tags
44 - name: Pre-commit hooks
46 pre-commit run --all-files
48 working-directory: docs
49 run: sphinx-build -E -W -b html . _build/html
50 - name: Build Python package
52 setuptools clean --all
53 pip install --upgrade build twine
54 for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
55 sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;