Add GitHub workflow / action to build board

This commit is contained in:
Marco Massarelli 2023-05-05 16:55:36 -04:00
parent 6ec2dd2b74
commit ced3f5c4eb
2 changed files with 36 additions and 0 deletions

28
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,28 @@
on: [push, pull_request, workflow_dispatch]
name: Build
jobs:
generate:
runs-on: ubuntu-latest
name: Generate
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker Cache
uses: ScribeMD/docker-cache@0.3.3
with:
key: docker-${{ runner.os }}
- name: Use Node.js 17
uses: actions/setup-node@v3
with:
node-version: 17.x
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Generate unrouted PCBs with Ergogen (definition in package.json)
run: npm run gen
- name: Persist output
uses: actions/upload-artifact@v3
with:
name: unrouted-pcb
path: ergogen/output/pcbs

8
package.json Normal file
View File

@ -0,0 +1,8 @@
{
"scripts": {
"gen": "ergogen ergogen --debug --clear --output ergogen/output"
},
"dependencies": {
"ergogen": "github:ergogen/ergogen"
}
}