-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (76 loc) · 2.19 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
81
82
83
84
85
name: CI Build
on:
push:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- environment: mk4-release
ud_gen: MK4
ud_debug: 0
target: esp32s2
- environment: mk5-release
ud_gen: MK5
ud_debug: 0
target: esp32s3
- environment: mk6-release
ud_gen: MK6
ud_debug: 0
target: esp32s3
- environment: mk7-release
ud_gen: MK7
ud_debug: 0
target: esp32s3
- environment: mk7-debug
ud_gen: MK7
ud_debug: 1
target: esp32s3
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: "recursive"
- name: esp-idf build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.3.1
target: ${{ matrix.target }}
command: idf.py build -DUD_GEN=${{ matrix.ud_gen }} -DUD_DEBUG=${{ matrix.ud_debug }}
- name: Rename firmware artifact
run: |
cp build/ugly-duckling.bin ugly-duckling-${{ matrix.environment }}.bin
- name: Create debug artifact
run: |
zip debug-${{ matrix.environment }}.zip \
build/project_description.json \
build/*.bin \
build/*.elf \
build/*.map \
build/config/sdkconfig.h
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ugly-duckling-${{ matrix.environment }}
path: |
ugly-duckling-${{ matrix.environment }}.bin
debug-${{ matrix.environment }}.zip
if-no-files-found: error
release:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: AButler/[email protected]
with:
files: ugly-duckling-*/*
repo-token: ${{ secrets.GITHUB_TOKEN }}