-
Notifications
You must be signed in to change notification settings - Fork 17
80 lines (66 loc) · 1.84 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build distributable and production files
env:
MAKE_DEFAULT: false
MAKE_PDF: true
MAKE_PROD: false
MAKE_REF: false
permissions:
contents: write
on:
workflow_dispatch:
push:
tags: r**
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/tuna-f1sh/kicad-makefile:latest
# mount the workspace path to container workdir /project so accessible by all steps
volumes:
- ${{ github.workspace }}:/project
steps:
- uses: actions/checkout@v4
- name: Prepare
# https://github.com/actions/runner/issues/2033
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run make
if: ${{ env.MAKE_DEFAULT == 'true' }}
run: make
- name: Run make pdf
if: ${{ env.MAKE_PDF == 'true' }}
# merged pdf
run: make pdf
- name: Run make prod-*
if: ${{ env.MAKE_PROD == 'true' }}
run: |
# separated as most suppliers ask for this
make prod-gerbers
make prod-bom
make prod-pos
- name: Run make dist-ref
if: ${{ env.MAKE_REF == 'true' }}
run: |
# pcb and sch renders
make dist-ref
- name: Upload outputs
uses: actions/upload-artifact@v4
with:
name: kicad-makefile-output
path: output
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: Download outputs
uses: actions/download-artifact@v4
with:
name: kicad-makefile-output
path: output
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: false
files: |
output/*.pdf
output/**/*.zip