KiCad-Actions-Demo
Manufacturing Outputs AllSpice.io Action
This AllSpice.io Action automates the process of generating manufacturing outputs for KiCad projects using a Docker container with the AllSpice KiCad image. The primary goal of this repository is to demonstrate how to load the KiCad image effectively.
Overview
The workflow is triggered by two events:
- A
pushto the repository. - A
releaseevent, specifically when a release is published or edited.
The action runs in a Docker container based on the allspice/kicad:8.0-releases image, ensuring a consistent environment for generating KiCad outputs.
Workflow Details
-
Trigger Events:
This workflow is triggered by either apushevent or areleaseevent (with typespublishedoredited). -
Runs On:
It runs on the latest Ubuntu AllSpice.io runner (ubuntu-latest) with the KiCad container. -
Steps:
- Check out repository code:
Uses the AllSpice.ioactions/checkout@v4action to check out the repository containing the KiCad project. - Print variables:
Outputs the values ofSCH_FILENAMEandPCB_FILENAMEfor verification. - Install Python requirements:
Installs required Python packages from.allspice/utils/requirements.txtusingpip.
- Check out repository code:
Example Usage
To use this AllSpice.io Action in your repository:
- Add the following workflow file (e.g.,
.allspice/workflows/manufacturing-outputs.yml):
name: manufacturing-outputs
on:
push:
release:
types: [published, edited]
jobs:
Generate-Manufacturing-Outputs:
runs-on: ubuntu-latest
container:
image: allspice/kicad:8.0-releases
steps:
- name: "Check out repository code"
uses: actions/checkout@v4
- name: "Print variables"
run: |
echo ${{vars.SCH_FILENAME}}
echo ${{vars.PCB_FILENAME}}
- name: "Install python requirements"
run: pip install -r .allspice/utils/requirements.txt
-
Ensure that your KiCad project contains the necessary schematic (
SCH_FILENAME) and PCB (PCB_FILENAME) files, and define these environment variables in your repository. -
Make sure you have a
requirements.txtfile in the.allspice/utils/directory, listing all the Python dependencies needed to process the KiCad files.
Goal
The goal of this repository is to provide a simple demonstration of how to load the KiCad Docker image and set up an environment for processing KiCad projects. You can further expand this example to generate manufacturing outputs such as Gerber files or BOM by adding relevant KiCad commands or scripts in additional steps.