-
-
Notifications
You must be signed in to change notification settings - Fork 236
74 lines (66 loc) · 2.1 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
name: PlatformIO CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
env:
VERSION_REF: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }}
strategy:
matrix:
include:
- env: c53
bin_ext: uf2
- env: pico
bin_ext: uf2
- env: arduino_uno
bin_ext: hex
- env: arduino_nano
bin_ext: hex
- env: arduino_mega
bin_ext: hex
- env: arduino_leonardo
bin_ext: hex
- env: arduino_micro
bin_ext: hex
- env: b0xx_r1
bin_ext: hex
- env: b0xx_r2
bin_ext: hex
- env: gccmx
bin_ext: hex
- env: gccpcb1
bin_ext: hex
- env: gccpcb2
bin_ext: hex
- env: lbx
bin_ext: hex
- env: smashbox
bin_ext: hex
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build ${{ matrix.env }} env
run: |
pio run -e ${{ matrix.env }}
mkdir -p ${{ matrix.env }}
cp .pio/build/${{ matrix.env }}/firmware.${{ matrix.bin_ext }} ${{ matrix.env }}/HayBox-${{ env.VERSION_REF }}-${{ matrix.env }}.${{ matrix.bin_ext }}
- name: Publish ${{ matrix.env }} artifacts
uses: actions/upload-artifact@v3
with:
name: HayBox-${{ env.VERSION_REF }}-${{ matrix.env }}.${{ matrix.bin_ext }}
path: ${{ matrix.env }}/HayBox-${{ env.VERSION_REF }}-${{ matrix.env }}.${{ matrix.bin_ext }}
- name: Upload binaries to release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
files: ${{ matrix.env }}/HayBox-${{ env.VERSION_REF }}-${{ matrix.env }}.${{ matrix.bin_ext }}