Skip to content

Commit 98748cf

Browse files
committed
Corrected BOM, Automated Gerber and Docs generation for release, bump version
BOM generation is remaining manual Corrected manufacturer part# Update build.yml
1 parent 46fc690 commit 98748cf

File tree

9 files changed

+51
-119
lines changed

9 files changed

+51
-119
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
name: KiCad Fabrication Build
2-
31
on:
42
push:
53
tags:
@@ -16,106 +14,31 @@ jobs:
1614
steps:
1715
- name: Checkout Repository
1816
uses: actions/checkout@v3
19-
20-
- name: Install KiCad CLI
21-
run: |
22-
sudo add-apt-repository ppa:kicad/kicad-8.0-releases -y
23-
sudo apt update
24-
sudo apt install -y kicad-cli
25-
26-
- name: Clean Gerber and Centroid Output Folders
27-
run: |
28-
mkdir -p fabrication-outputs/gerber-files
29-
mkdir -p fabrication-outputs/centroid-files
30-
rm -rf fabrication-outputs/gerber-files/*
31-
rm -rf fabrication-outputs/centroid-files/*
32-
33-
- name: Generate Gerber and Drill Files
34-
run: |
35-
kicad-cli pcb export gerbers gamma-spectrometer.kicad_pro \
36-
--output fabrication-outputs/gerber-files \
37-
--layers F.Cu,B.Cu,F.SilkS,B.SilkS,F.Mask,B.Mask,Edge.Cuts \
38-
--exclude-drawing-layers \
39-
--precision 4 \
40-
--drill-origin absolute \
41-
--drill-format gerberx2 \
42-
--map-format gerberx2 \
43-
--include-drill \
44-
--no-x2
45-
46-
- name: Export Raw Position File
47-
run: |
48-
kicad-cli pcb export position \
49-
gamma-spectrometer.kicad_pro \
50-
--output centroid.csv \
51-
--format csv \
52-
--units mm \
53-
--side front back
54-
55-
- name: Format Centroid File
56-
run: |
57-
python3 <<EOF
58-
import csv
59-
import os
60-
61-
os.makedirs("fabrication-outputs/centroid-files", exist_ok=True)
62-
63-
def mm_to_mil(mm):
64-
return float(mm) * 39.3701
65-
66-
with open("centroid.csv", newline='') as infile, open("fabrication-outputs/centroid-files/centroid.txt", "w") as outfile:
67-
reader = csv.DictReader(infile)
68-
headers = [
69-
"Designator", "Footprint", "Mid X", "Mid Y",
70-
"Ref X", "Ref Y", "Pad X", "Pad Y", "TB",
71-
"Rotation", "Comment"
72-
]
73-
outfile.write(" ".join(headers) + "\\n\\n")
74-
for row in reader:
75-
ref = row["Ref"]
76-
footprint = row["Footprint"]
77-
x = mm_to_mil(row["PosX(mm)"])
78-
y = mm_to_mil(row["PosY(mm)"])
79-
layer = "T" if row["Layer"] == "F" else "B"
80-
rot = row["Rot (deg)"]
81-
comment = row["Val"]
82-
83-
ref_x = pad_x = x + 30
84-
ref_y = pad_y = y
85-
86-
line = f"{ref:<10}{footprint:<20}{x:10.3f}mil {y:10.3f}mil {ref_x:10.3f}mil {ref_y:10.3f}mil {pad_x:10.3f}mil {pad_y:10.3f}mil {layer:<8}{rot:>8} {comment}"
87-
outfile.write(line + "\\n")
88-
EOF
89-
90-
- name: Archive Gerber Files
91-
if: github.ref_type == 'tag'
92-
run: |
93-
mkdir -p build
94-
cd fabrication-outputs
95-
zip -r ../build/open-gamma-kit-gerber-files-${{ github.ref_name }}.zip gerber-files
96-
97-
- name: Archive Documentation Files
98-
if: github.ref_type == 'tag'
99-
run: |
100-
mkdir -p build
101-
zip -j build/README.zip docs/gamma-spectrometer.pdf README.md
102-
103-
- name: Archive Centroid Files
104-
if: github.ref_type == 'tag'
17+
- name: Generate Gerber, Drill Files and Documentation
10518
run: |
10619
mkdir -p build
107-
cd fabrication-outputs
108-
zip -r ../build/open-gamma-kit-centroid-files-${{ github.ref_name }}.zip centroid-files
20+
21+
- name: Run KiCad export
22+
uses: vikulin/kicad-action@main
23+
with:
24+
kicad_sch: gamma-spectrometer.kicad_sch
25+
sch_pdf: true # Generate PDF
26+
sch_pdf_file: docs/open-gamma-kit-${{ github.ref_name }}.pdf
27+
sch_bom: false
28+
kicad_pcb: gamma-spectrometer.kicad_pcb
29+
pcb_gerbers: true # Generate Gerbers
30+
pcb_gerbers_file: build/open-gamma-kit-gerber-files-${{ github.ref_name }}.zip
31+
pcb_gerbers_layers: F.Cu,B.Cu,F.SilkS,B.SilkS,F.Mask,B.Mask,Edge.Cuts
10932

11033
- name: Upload Artifacts
34+
if: github.ref_type == 'tag'
11135
uses: actions/upload-artifact@v4
11236
with:
11337
name: ogk-release-${{ github.ref_name }}
11438
path: |
11539
build/open-gamma-kit-gerber-files-${{ github.ref_name }}.zip
116-
build/open-gamma-kit-centroid-files-${{ github.ref_name }}.zip
11740
docs/BOM.csv
118-
build/README.zip
41+
docs/open-gamma-kit-${{ github.ref_name }}.pdf
11942
12043
- name: Generate Changelog Since Last Tag
12144
if: github.ref_type == 'tag'
@@ -129,6 +52,17 @@ jobs:
12952
echo "" >> RELEASE_BODY.md
13053
echo "🔧 Thanks for supporting OpenGammaKit! If you find any issues or have suggestions, feel free to [open an issue](https://github.com/${{ github.repository }}/issues)." >> RELEASE_BODY.md
13154
55+
echo "" >> RELEASE_BODY.md
56+
echo "### 📦 Release Contents" >> RELEASE_BODY.md
57+
echo "" >> RELEASE_BODY.md
58+
echo "| File Name | Description |" >> RELEASE_BODY.md
59+
echo "|-------------------------------------------------------------|-----------------------------------------------------------------------------|" >> RELEASE_BODY.md
60+
echo "| \`open-gamma-kit-gerber-files-${{ github.ref_name }}.zip\` | 🟢 Complete Gerber and Drill files (Gerber X2 format) for PCB fabrication. |" >> RELEASE_BODY.md
61+
echo "| \`open-gamma-kit-${{ github.ref_name }}.pdf\` | 📄 PDF documentation |" >> RELEASE_BODY.md
62+
echo "| \`BOM.csv\` | 📋 Bill of Materials (not archived — listed separately). |" >> RELEASE_BODY.md
63+
echo "" >> RELEASE_BODY.md
64+
echo "📁 **Location**: All files are available in the [Assets](#assets) section at the bottom of this release page." >> RELEASE_BODY.md
65+
13266
- name: Create GitHub Release
13367
if: github.ref_type == 'tag'
13468
uses: softprops/action-gh-release@v2
@@ -138,8 +72,7 @@ jobs:
13872
body_path: RELEASE_BODY.md
13973
files: |
14074
build/open-gamma-kit-gerber-files-${{ github.ref_name }}.zip
141-
build/open-gamma-kit-centroid-files-${{ github.ref_name }}.zip
14275
docs/BOM.csv
143-
build/README.zip
76+
docs/open-gamma-kit-${{ github.ref_name }}.pdf
14477
env:
14578
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,19 @@ OpenGammaKit is designed to be affordable, reliable, and easy to integrate with
2020

2121
## 📂 Repository Contents
2222

23-
- `/docs/` – 3D render previews of the board, Bill of Materials (BOM), KiCad schematic
23+
- `/docs/` – 3D render previews of the board, Bill of Materials (BOM)
2424
- `/kicad-libraries/` – KiCad libraries, including custom footprints
2525

2626
---
2727

2828
## 📦 Release Contents
2929

30-
OpenGammaKit releases version **0.1.4.5** and later include all the fabrication files required to manufacture and assemble the OpenGammaKit gamma spectrometer hardware:
30+
OpenGammaKit releases version **0.1.5.1** and later include all the fabrication files required to manufacture and assemble the OpenGammaKit gamma spectrometer hardware:
3131

3232
| File Name | Description |
3333
| --------------------------------------------- | -------------------------------------------------------------------------- |
34-
| `open-gamma-kit-gerber-files-<version>.zip` | 🟢 Complete Gerber and Drill files (Gerber X2 format) for PCB fabrication. |
35-
| `open-gamma-kit-centroid-files-<version>.zip` | 📍 Centroid (Pick-and-Place) file in mils for automated assembly. |
36-
| `README.zip` | 📄 PDF documentation + README.md. |
34+
| `open-gamma-kit-gerber-files-<version>.zip` | 🟢 Complete Gerber and Drill files for PCB fabrication. |
35+
| `open-gamma-kit-<version>.pdf` | 📄 PDF documentation |
3736
| `BOM.csv` | 📋 Bill of Materials (not archived — listed separately). |
3837

3938
📁 **Location**: All files are available in the [Assets](https://github.com/vikulin/OpenGammaKit/releases) release section.

docs/BOM.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"1","C3,C5,C6,C7,C10,C16,C20,C21,C22","9","CL10B104KC8NNNC","100n","0603 Samsung","CL10B104KC8NNNC:CAPC1608X90N"
33
"2","C8","1","ECHU1C471JX5","470p","0603-2 Panasonic","ECHU1C471JX5:CAP_ECHU1C471JX5"
44
"3","C12,C13,C14,C15","4","CL21A475KBQNNNE","4.7u","0805 Samsung","CL21A475KBQNNNE:CAPC2012X140N"
5-
"4","C17,C19","2","CL21A475KBQNNNE","2.2u","0805 Samsung","CL21A475KBQNNNE:CAPC2012X140N"
5+
"4","C17,C19","2","CL10A225KB8NNNC","2.2u","0805 Samsung","CL21A475KBQNNNE:CAPC2012X140N"
66
"5","D2","1","LTST-C190KGKT","LTST-C190KGKT","0603 Lite-On","LTST-C190KGKT:LEDC1608X35N"
7-
"6","FB1,FB2,FB3","3","ACML-0402HC-301-T","BLM18KG102SN1D","0402 Abracon","ACML-0402HC-301-T:BEADC1005X65N"
7+
"6","FB1,FB2,FB3","3","490-17349-1-ND","BLM18KG102SN1D","0402 Abracon","ACML-0402HC-301-T:BEADC1005X65N"
88
"7","J1,J2","2","-- mixed values --","*","Custom","-- mixed values --"
99
"8","L1","1","NRS4018T470MDGJ","47uH","Nonstandard Taiyo Yuden","NRS4018T470MDGJ:IND_NRS4018T470MDGJ"
1010
"9","U1","1","SC1631","Pico 2","Custom","RP PICO:RPi_Pico_SMD_TH"

docs/gamma-spectrometer.pdf

-400 KB
Binary file not shown.

gamma-spectrometer.kicad_pcb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@
17211721
)
17221722
)
17231723
)
1724-
(property "MP" "CL21A475KBQNNNE"
1724+
(property "MP" "CL10A225KB8NNNC"
17251725
(at 0 0 0)
17261726
(unlocked yes)
17271727
(layer "F.Fab")
@@ -2359,7 +2359,7 @@
23592359
)
23602360
)
23612361
)
2362-
(property "MP" "ACML-0402HC-301-T"
2362+
(property "MP" "490-17349-1-ND"
23632363
(at 0 0 180)
23642364
(unlocked yes)
23652365
(layer "F.Fab")
@@ -4266,7 +4266,7 @@
42664266
)
42674267
)
42684268
)
4269-
(property "MP" "CL21A475KBQNNNE"
4269+
(property "MP" "CL10A225KB8NNNC"
42704270
(at 0 0 0)
42714271
(unlocked yes)
42724272
(layer "F.Fab")
@@ -15800,7 +15800,7 @@
1580015800
(justify mirror)
1580115801
)
1580215802
)
15803-
(property "MP" "ACML-0402HC-301-T"
15803+
(property "MP" "490-17349-1-ND"
1580415804
(at 0 0 0)
1580515805
(unlocked yes)
1580615806
(layer "B.Fab")
@@ -16420,7 +16420,7 @@
1642016420
(justify mirror)
1642116421
)
1642216422
)
16423-
(property "MP" "ACML-0402HC-301-T"
16423+
(property "MP" "490-17349-1-ND"
1642416424
(at 0 0 0)
1642516425
(unlocked yes)
1642616426
(layer "B.Fab")
@@ -23526,7 +23526,7 @@
2352623526
(justify left bottom)
2352723527
)
2352823528
)
23529-
(gr_text "OpenGammaKit v0.1.4"
23529+
(gr_text "OpenGammaKit v0.1.5"
2353023530
(at 119.5 100.75 0)
2353123531
(layer "F.Cu" knockout)
2353223532
(uuid "7843cbe3-fa1d-4ac2-9678-1670f4da9ced")
@@ -27218,8 +27218,8 @@
2721827218
(xy 163.3755 96.5005) (xy 163.442539 96.520185) (xy 163.488294 96.572989) (xy 163.4995 96.6245)
2721927219
(xy 163.4995 101.3755) (xy 163.479815 101.442539) (xy 163.427011 101.488294) (xy 163.3755 101.4995)
2722027220
(xy 76.1245 101.4995) (xy 76.057461 101.479815) (xy 76.011706 101.427011) (xy 76.0005 101.3755)
27221-
(xy 76.0005 101.205828) (xy 119.825378 101.205828) (xy 144.495225 101.205828) (xy 144.495225 98.822676)
27222-
(xy 119.825378 98.822676) (xy 119.825378 101.205828) (xy 76.0005 101.205828) (xy 76.0005 92.779997)
27221+
(xy 76.0005 101.205828) (xy 119.825378 101.205828) (xy 144.425522 101.205828) (xy 144.425522 98.892984)
27222+
(xy 119.825378 98.892984) (xy 119.825378 101.205828) (xy 76.0005 101.205828) (xy 76.0005 92.779997)
2722327223
(xy 88.144341 92.779997) (xy 88.144341 92.780001) (xy 88.149028 92.833574) (xy 88.1495 92.844381)
2722427224
(xy 88.1495 95.47787) (xy 88.149501 95.477876) (xy 88.155908 95.537483) (xy 88.206202 95.672328)
2722527225
(xy 88.206206 95.672335) (xy 88.292452 95.787544) (xy 88.292455 95.787547) (xy 88.407664 95.873793)

gamma-spectrometer.kicad_pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
"idf": "",
468468
"netlist": "",
469469
"plot": "fabrication-outputs/gerber-files/",
470-
"pos_files": "",
470+
"pos_files": "fabrication-outputs/centroid-files/",
471471
"specctra_dsn": "",
472472
"step": "",
473473
"svg": "solder-mask/",

gamma-spectrometer.kicad_sch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
(paper "A4")
77
(title_block
88
(title "Gamma Spectrometer")
9-
(date "2025-01-17")
10-
(rev "0.1.4")
9+
(date "2025-05-06")
10+
(rev "0.1.5")
1111
(company "Vadym Vikulin")
1212
)
1313
(lib_symbols
@@ -10172,7 +10172,7 @@
1017210172
(hide yes)
1017310173
)
1017410174
)
10175-
(property "MP" "ACML-0402HC-301-T"
10175+
(property "MP" "490-17349-1-ND"
1017610176
(at 148.59 172.72 0)
1017710177
(effects
1017810178
(font
@@ -10856,7 +10856,7 @@
1085610856
(hide yes)
1085710857
)
1085810858
)
10859-
(property "MP" "ACML-0402HC-301-T"
10859+
(property "MP" "490-17349-1-ND"
1086010860
(at 111.76 34.29 0)
1086110861
(effects
1086210862
(font
@@ -11552,7 +11552,7 @@
1155211552
(hide yes)
1155311553
)
1155411554
)
11555-
(property "MP" "ACML-0402HC-301-T"
11555+
(property "MP" "490-17349-1-ND"
1155611556
(at 71.12 147.32 0)
1155711557
(effects
1155811558
(font

preamp.kicad_sch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
(title_block
88
(title "Amplifier")
99
(date "2025-03-23")
10-
(rev "0.1.4")
10+
(rev "0.1.5")
1111
(company "Vadym Vikulin")
1212
)
1313
(lib_symbols

sipm_board.kicad_sch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
(title_block
88
(title "SiPM Board")
99
(date "2025-01-22")
10-
(rev "0.1.4")
10+
(rev "0.1.5")
1111
(company "Vadym Vikulin")
1212
(comment 7 "Temperature Correction (~21 mV/K)")
1313
)
@@ -3473,7 +3473,7 @@
34733473
(hide yes)
34743474
)
34753475
)
3476-
(property "MP" "CL21A475KBQNNNE"
3476+
(property "MP" "CL10A225KB8NNNC"
34773477
(at 100.33 101.6 0)
34783478
(effects
34793479
(font
@@ -4130,7 +4130,7 @@
41304130
(hide yes)
41314131
)
41324132
)
4133-
(property "MP" "CL21A475KBQNNNE"
4133+
(property "MP" "CL10A225KB8NNNC"
41344134
(at 146.05 101.6 0)
41354135
(effects
41364136
(font

0 commit comments

Comments
 (0)