Do not version generated kicad_pcb
files and generate v2 svg
#101
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [push, pull_request] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade hatch | |
- name: Test | |
run: | | |
hatch run cov | |
- name: Upload coverage data | |
if: matrix.python-version == '3.11' && github.ref == 'refs/heads/master' | |
run: | | |
hatch run coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pure-python-wheel-and-sdist: | |
name: Build a pure Python wheel and source distribution | |
needs: | |
- tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install build dependencies | |
run: python -m pip install --upgrade build | |
- name: Build | |
run: python -m build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: dist/* | |
retention-days: 5 | |
if-no-files-found: error | |
publish: | |
name: Publish release | |
needs: | |
- pure-python-wheel-and-sdist | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifacts | |
path: dist | |
- name: Push build artifacts to PyPI | |
uses: pypa/[email protected] | |
with: | |
skip_existing: true | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |