Skip to content

Commit 7d18c52

Browse files
committed
Optimize/Extend release pipeline
1 parent a222355 commit 7d18c52

2 files changed

Lines changed: 94 additions & 67 deletions

File tree

.github/workflows/release.yml

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ jobs:
99
export-kicad:
1010
env:
1111
BaseFileName: "PMG"
12+
Folder: "./pcb"
1213
SchematicFileExtension: "kicad_sch"
1314
PCBFileExtension: "kicad_pcb"
14-
OutputFolder: "kicad"
15+
OutputFolder: "./output"
1516
ConfigFilePath: ".kibot/release.kibot.yaml"
1617
runs-on: ubuntu-latest
1718
steps:
@@ -21,22 +22,17 @@ jobs:
2122
- name: Prepare output directory
2223
run: |
2324
mkdir -p ${{ env.OutputFolder }}
24-
cp -r ./pcb ${{ env.OutputFolder }}/kicad
25+
cp -r ${{ env.Folder }} ${{ env.OutputFolder }}/kicad
2526
cp ./LICENSE ${{ env.OutputFolder }}
2627
27-
- name: Copy License
28-
run: |
29-
mkdir -p ${{ env.OutputFolder }}
30-
cp ./LICENSE ${{ env.OutputFolder }}
31-
3228
- name: Run KiBOT
33-
uses: INTI-CMNB/KiBot@v2_dk7
29+
uses: INTI-CMNB/KiBot@v2_k9
3430
with:
3531
config: ${{ env.ConfigFilePath }}
3632
dir: ${{ env.OutputFolder }}
37-
schema: "pcb/${{ env.BaseFileName }}.${{ env.SchematicFileExtension }}"
38-
board: "pcb/${{ env.BaseFileName }}.${{ env.PCBFileExtension }}"
39-
33+
schema: "${{ env.Folder }}/${{ env.BaseFileName }}.${{ env.SchematicFileExtension }}"
34+
board: "${{ env.Folder }}/${{ env.BaseFileName }}.${{ env.PCBFileExtension }}"
35+
4036
- name: Archive artifacts
4137
uses: actions/upload-artifact@v4
4238
with:
@@ -46,25 +42,26 @@ jobs:
4642

4743
export-freecad:
4844
env:
49-
FREECADVERSION: "0.21.2"
45+
FREECADVERSION: "1.1.1"
5046
FreeCADFileName: "./mechanical/housing.FCStd"
5147
OutputFolder: "./output"
5248
PartType: "PartDesign::Body"
5349
runs-on: ubuntu-latest
5450
steps:
5551
- name: Fetch repository
5652
uses: actions/checkout@v4
57-
53+
5854
- name: Prepare output directory
5955
run: |
6056
mkdir -p ${{ env.OutputFolder }}
57+
cp -r ./mechanical ${{ env.OutputFolder }}
6158
cp ./LICENSE ${{ env.OutputFolder }}
62-
59+
6360
- name: Install FreeCAD
6461
run: |
65-
wget https://github.com/FreeCAD/FreeCAD/releases/download/${{ env.FREECADVERSION }}/FreeCAD-${{ env.FREECADVERSION }}-Linux-x86_64.AppImage
66-
chmod 0777 ./FreeCAD-${{ env.FREECADVERSION }}-Linux-x86_64.AppImage
67-
./FreeCAD-${{ env.FREECADVERSION }}-Linux-x86_64.AppImage --appimage-extract
62+
wget https://github.com/FreeCAD/FreeCAD/releases/download/${{ env.FREECADVERSION }}/FreeCAD_${{ env.FREECADVERSION }}-Linux-x86_64-py311.AppImage
63+
chmod 0777 FreeCAD_${{ env.FREECADVERSION }}-Linux-x86_64-py311.AppImage
64+
./FreeCAD_${{ env.FREECADVERSION }}-Linux-x86_64-py311.AppImage --appimage-extract
6865
- name: Get FreeCAD Export
6966
run: |
7067
git clone https://github.com/0x007E/pyfreecadexport.git
@@ -160,6 +157,26 @@ jobs:
160157
asset_path: ./artifact/kicad/drill/PMG-drill_map.pdf
161158
asset_name: drill.pdf
162159
asset_content_type: application/pdf
160+
161+
- name: Upload KiCAD BOM
162+
uses: actions/upload-release-asset@v1
163+
env:
164+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
165+
with:
166+
upload_url: ${{ steps.create_release.outputs.upload_url }}
167+
asset_path: ./artifact/kicad/bom/PMG-bom.xlsx
168+
asset_name: bom.xlsx
169+
asset_content_type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
170+
171+
- name: Upload KiCAD iBOM
172+
uses: actions/upload-release-asset@v1
173+
env:
174+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
175+
with:
176+
upload_url: ${{ steps.create_release.outputs.upload_url }}
177+
asset_path: ./artifact/kicad/ibom/IBOM.html
178+
asset_name: bom.html
179+
asset_content_type: text/html
163180

164181
- name: Upload KiCAD Asset
165182
uses: actions/upload-release-asset@v1
@@ -214,4 +231,5 @@ jobs:
214231
upload_url: ${{ steps.create_release.outputs.upload_url }}
215232
asset_path: ./artifact/freecad.zip
216233
asset_name: freecad.zip
217-
asset_content_type: application/zip
234+
asset_content_type: application/zip
235+

.kibot/release.kibot.yaml

Lines changed: 58 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,12 @@ globals:
2121
preflight:
2222
check_zone_fills: true
2323
fill_zones: true
24-
run_erc: true
25-
run_drc: true
26-
filters:
27-
- filter: 'does not match copy in library'
28-
error: 'lib_footprint_mismatch'
29-
regex: 'does not match copy in library'
30-
- filter: 'Silkscreen overlap'
31-
error: 'silk_overlap'
32-
regex: 'Silkscreen overlap'
33-
# - filter: 'Missing connection between items'
34-
# error: 'unconnected_items'
35-
# regex: 'Missing connection between items'
24+
25+
erc:
26+
enabled: true
27+
drc:
28+
enabled: true
29+
3630
set_text_variables:
3731
- name: 'date'
3832
command: 'date +%d.%m.%Y'
@@ -51,48 +45,32 @@ outputs:
5145
- Row
5246
- References
5347
- Footprint
54-
- field: Vendor
55-
name: Vendor
56-
- field: VendorId
57-
name: VendorId
48+
- field: HTL
49+
name: HTL
5850
- Quantity Per PCB
5951
normalize_values: true
6052

53+
- name: 'ibom'
54+
comment: 'Interactive HTML BoM'
55+
type: ibom
56+
dir: './ibom'
57+
options:
58+
output: 'IBOM.%x'
59+
layer_view: 'F'
60+
# bom_view: 'left-right'
61+
bom_view: 'top-bottom'
62+
include_tracks: false
63+
show_fields: 'Value,Footprint,HTL'
64+
6165
- name: 'print_sch'
6266
comment: 'Schematic PDF'
6367
type: pdf_sch_print
6468
dir: './schematic'
6569
options:
6670
monochrome: true
6771

68-
- name: 'gerbers'
69-
comment: 'Gerber Files'
70-
type: gerber
71-
dir: './gerber'
72-
layers:
73-
- F.Cu
74-
- B.Cu
75-
- F.Adhesive
76-
- B.Adhesive
77-
- F.Paste
78-
- B.Paste
79-
- F.Silkscreen
80-
- B.Silkscreen
81-
- F.Mask
82-
- B.Mask
83-
- Edge.Cuts
84-
85-
- name: drill
86-
comment: Drill files
87-
type: excellon
88-
dir: './drill'
89-
options:
90-
map:
91-
type: pdf
92-
pth_and_npth_single_file: true
93-
94-
- name: print_pdf_top
95-
comment: 'PCB PDF TOP'
72+
- name: print_pcb
73+
comment: 'PCB to PDF'
9674
type: pcb_print
9775
dir: './pcb'
9876
options:
@@ -145,6 +123,42 @@ outputs:
145123
# monochrome: true
146124
# mirror: true
147125

126+
- name: 'gerbers'
127+
comment: 'Gerber Files'
128+
type: gerber
129+
dir: './gerber'
130+
layers:
131+
- F.Cu
132+
- B.Cu
133+
- F.Adhesive
134+
- B.Adhesive
135+
- F.Paste
136+
- B.Paste
137+
- F.Silkscreen
138+
- B.Silkscreen
139+
- F.Mask
140+
- B.Mask
141+
- Edge.Cuts
142+
143+
- name: drill
144+
comment: Drill files
145+
type: excellon
146+
dir: './drill'
147+
options:
148+
map:
149+
type: pdf
150+
pth_and_npth_single_file: true
151+
152+
- name: mechanical
153+
comment: "3D export (STEP)"
154+
type: export_3d
155+
dir: './step'
156+
options:
157+
format: 'step'
158+
output: '%f-%i%I%v.%x'
159+
download: true
160+
no_virtual: true
161+
148162
# - name: board_top_filled
149163
# comment: "Top layer view with components"
150164
# type: pcbdraw
@@ -163,11 +177,6 @@ outputs:
163177
# dpi: 300
164178
# bottom: true
165179
# show_components: all
166-
167-
- name: mechanical
168-
comment: "STEP model"
169-
type: step
170-
dir: './step'
171180

172181
- name: 3D_top
173182
comment: "3D render from top (High Quality)"

0 commit comments

Comments
 (0)