-
Notifications
You must be signed in to change notification settings - Fork 5
100 lines (83 loc) · 2.76 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
on:
push:
tags:
- 'v*'
pull_request:
permissions:
contents: write
name: Build
jobs:
build:
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-tags: true
fetch-depth: 0
- name: Add version
run: git describe --tags | sed 's/-[^-]*$//' > version.txt
- name: esp-idf build NO OTA
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.4-dev
target: esp32c6
path: './firmware'
command: "idf.py @profiles/noota build"
- name: Create NO OTA folder
run: mkdir -p ./firmware/build-noota-release
- name: Move NO OTA binaries
run: |
cp ./firmware/build-noota/*.bin ./firmware/build-noota-release/
cp ./firmware/build-noota/*/*.bin ./firmware/build-noota-release/
- name: esp-idf build OTA
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.4-dev
target: esp32c6
path: './firmware'
command: "idf.py @profiles/ota build"
- name: Create OTA folder
run: mkdir -p ./firmware/build-ota-release
- name: Move OTA binaries
run: |
cp ./firmware/build-ota/*.bin ./firmware/build-ota-release/
cp ./firmware/build-ota/*/*.bin ./firmware/build-ota-release/
- name: Zip NO OTA Folder
run: zip -r ./firmware/minino-noota-firmware.zip ./firmware/build-noota-release/
- name: Zip OTA Folder
run: zip -r ./firmware/minino-ota-firmware.zip ./firmware/build-ota-release/
- name: Archive Firmware NO OTA ZIP
uses: actions/upload-artifact@v4
with:
name: minino-noota-firmware-zip
path: "./firmware/minino-noota-firmware.zip"
- name: Archive Firmware OTA ZIP
uses: actions/upload-artifact@v4
with:
name: minino-ota-firmware-zip
path: "./firmware/minino-ota-firmware.zip"
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Firmware ZIP Files
uses: actions/download-artifact@v4
with:
name: minino-noota-firmware-zip
path: ./release/
- name: Download OTA Firmware ZIP Files
uses: actions/download-artifact@v4
with:
name: minino-ota-firmware-zip
path: ./release/
- name: Release Firmware
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: release/minino-noota-firmware.zip,release/minino-ota-firmware.zip
generateReleaseNotes: true
allowUpdates: true