-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into develop
- Loading branch information
Showing
8 changed files
with
179 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ jobs: | |
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
showConfig: true | ||
configFilePath: ./gitversion.yml | ||
- name: Display SemVer | ||
run: | | ||
|
@@ -98,12 +97,23 @@ jobs: | |
id: render_template | ||
uses: chuhlomin/render-template@v1 | ||
with: | ||
template: action.template.yml | ||
template: templates/action.template.yml | ||
result_path: action.yml | ||
vars: | | ||
image: ghcr.io/${{ env.REPOSITORY_LC }}:${{ needs.version.outputs.version }} | ||
image: docker://ghcr.io/${{ env.REPOSITORY_LC }}:${{ needs.version.outputs.version }} | ||
- name: Update README.md | ||
uses: recih/[email protected] | ||
env: | ||
ACTION_REPO: ${{ github.repository }} | ||
ACTION_VERSION: ${{ needs.version.outputs.version }} | ||
with: | ||
template-file: templates/README.template.md | ||
output-file: README.md | ||
engine: mustache | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
id: auto-commit | ||
with: | ||
commit_message: "Update metadata for ${{ github.event.commits[0].message }}" | ||
release-main: | ||
runs-on: ubuntu-latest | ||
needs: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ master, main, develop ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: FPGAwars/icezum | ||
ref: dbad423670419b82018bf6e33c418fc35558c1be | ||
path: proj | ||
- name: Render template | ||
id: render_template | ||
uses: chuhlomin/render-template@v1 | ||
with: | ||
template: templates/action.template.yml | ||
result_path: action.yml | ||
vars: | | ||
image: Dockerfile | ||
- uses: ./ | ||
with: | ||
input-file: proj/src-kicad/icezum.kicad_pcb | ||
output-directory: out | ||
position-format: gerber | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-gerber | ||
path: out/ | ||
test-readme-generation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Update README.md | ||
uses: recih/[email protected] | ||
env: | ||
ACTION_REPO: ${{ github.repository }} | ||
ACTION_VERSION: v1.0.0 | ||
with: | ||
template-file: templates/README.template.md | ||
output-file: README.md | ||
engine: mustache | ||
- name: Cat | ||
run: cat README.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
# KicadGerber Action | ||
# kicad-gerber Action | ||
|
||
Generates gerber & drill files for a specified PCB and places them in a specified directory | ||
|
||
## Inputs | ||
|
||
### `input-file` | ||
|
||
**Required** The PCB to process | ||
|
||
### `output-directory` | ||
|
||
The directory in which to place the gerber & drill files. Default "gerber". | ||
| Input | Required | Description | Default | | ||
|-------------------- |---------- |------------------------------------------------------------------------------------------------------------------- |---------- | | ||
| `input-file` | ✅ | The PCB to process | | | ||
| `output-directory` | | The directory in which to place the gerber & drill files | gerber | | ||
| `drill-format` | | The drill format to use. Options are gerber, excellon, and none | excellon | | ||
| `drill-units` | | The units to use for the drill file. Options are in, and mm. Does nothing if drill format is none or gerber | mm | | ||
| `position-format` | | The position format to use. Options are gerber, csv, ascii, and none | none | | ||
| `position-units` | | The units to use for the position file. Options are in, and mm. Does nothing if position format is none or gerber | in | | ||
|
||
## Example usage | ||
``` | ||
uses: BenMMcLean/KicadGerber@v1 | ||
uses: emilymclean/[email protected] | ||
with: | ||
input-file: pcb.kicad_pcb | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
#!/bin/sh -l | ||
#!/bin/bash | ||
|
||
mkdir -p /github/workspace/$2 | ||
kicad-cli pcb export drill -o /github/workspace/$2 /github/workspace/$1 | ||
kicad-cli pcb export gerbers -o /github/workspace/$2 /github/workspace/$1 | ||
output="/github/workspace/$2" | ||
input="/github/workspace/$1" | ||
drill_format="${3:-excellon}" | ||
drill_units="${4:-mm}" | ||
position_format="${5:-ascii}" | ||
position_units="${6:-in}" | ||
|
||
filename="$(basename -- "$input" .${input##*.})" | ||
|
||
mkdir -p "$output" | ||
kicad-cli pcb export gerbers -o "$output" "$input" | ||
|
||
if [[ "$drill_format" == "excellon" || "$drill_format" == "gerber" ]]; then | ||
kicad-cli pcb export drill --format "$drill_format" --excellon-units "$drill_units" -o "$output" "$input" | ||
fi | ||
|
||
if [[ "$position_format" == "ascii" || "$position_format" == "csv" ]]; then | ||
kicad-cli pcb export pos --format "$position_format" --units "$drill_units" -o "$output/$filename.pos" "$input" | ||
elif [[ "$position_format" == "gerber" ]]; then | ||
kicad-cli pcb export pos --format gerber --side front -o "$output/$filename.front.pos" "$input" | ||
kicad-cli pcb export pos --format gerber --side back -o "$output/$filename.back.pos" "$input" | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# kicad-gerber Action | ||
|
||
Generates gerber & drill files for a specified PCB and places them in a specified directory | ||
|
||
## Inputs | ||
|
||
| Input | Required | Description | Default | | ||
|-------------------- |---------- |------------------------------------------------------------------------------------------------------------------- |---------- | | ||
| `input-file` | ✅ | The PCB to process | | | ||
| `output-directory` | | The directory in which to place the gerber & drill files | gerber | | ||
| `drill-format` | | The drill format to use. Options are gerber, excellon, and none | excellon | | ||
| `drill-units` | | The units to use for the drill file. Options are in, and mm. Does nothing if drill format is none or gerber | mm | | ||
| `position-format` | | The position format to use. Options are gerber, csv, ascii, and none | none | | ||
| `position-units` | | The units to use for the position file. Options are in, and mm. Does nothing if position format is none or gerber | in | | ||
|
||
## Example usage | ||
``` | ||
uses: {{{ env.ACTION_REPO }}}@v{{{ env.ACTION_VERSION }}} | ||
with: | ||
input-file: pcb.kicad_pcb | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: 'KiCad Gerber' | ||
author: 'Emily McLean' | ||
description: 'Generates gerber & drill files for a specified KiCad PCB and places them in a specified directory' | ||
inputs: | ||
input-file: | ||
description: 'The PCB file to process' | ||
required: true | ||
output-directory: | ||
description: 'The directory in which to place the output' | ||
required: false | ||
default: "gerber" | ||
drill-format: | ||
description: 'The drill format to use. Options are gerber, excellon, and none.' | ||
required: false | ||
default: "excellon" | ||
drill-units: | ||
description: 'The units to use for the drill file. Options are in, and mm. Does nothing if drill format is none or gerber.' | ||
required: false | ||
default: "mm" | ||
position-format: | ||
description: 'The position format to use. Options are gerber, csv, ascii, and none' | ||
required: false | ||
default: "none" | ||
position-units: | ||
description: 'The units to use for the position file. Options are in, and mm. Does nothing if position format is none or gerber.' | ||
required: false | ||
default: "in" | ||
runs: | ||
using: 'docker' | ||
image: '{{ .image }}' | ||
args: | ||
- ${{`{{ inputs.input-file }}`}} | ||
- ${{`{{ inputs.output-directory }}`}} | ||
- ${{`{{ inputs.drill-format }}`}} | ||
- ${{`{{ inputs.drill-units }}`}} | ||
- ${{`{{ inputs.position-format }}`}} | ||
- ${{`{{ inputs.position-units }}`}} | ||
branding: | ||
icon: 'cpu' | ||
color: 'green' |