File tree 1 file changed +25
-5
lines changed
1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change 6
6
pull_request :
7
7
branches : [ master ]
8
8
release :
9
- types : [ published ]
9
+ types : [ created ]
10
10
workflow_dispatch :
11
11
12
12
jobs :
13
13
build :
14
14
runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : write
17
+ strategy :
18
+ matrix :
19
+ esp-variant :
20
+ - esp32
21
+ - esp32-s3
22
+ - esp32-c3
15
23
steps :
16
24
- name : Checkout
17
25
uses : actions/checkout@v3
@@ -22,22 +30,34 @@ jobs:
22
30
23
31
with :
24
32
esp_idf_version : v5.2.1
25
- command : idf.py image
33
+ command : |
34
+ idf.py set-target ${{ matrix.esp-variant }}
35
+ idf.py image
26
36
27
37
- name : Upload Application Image
28
38
uses : actions/upload-artifact@v4
29
39
with :
30
- name : Application
40
+ name : Application (${{ matrix.esp-variant }})
31
41
path : build/ble2mqtt.bin
32
42
33
43
- name : Upload Filesystem Image
34
44
uses : actions/upload-artifact@v4
35
45
with :
36
- name : File System
46
+ name : File System (${{ matrix.esp-variant }})
37
47
path : build/fs_0.bin
38
48
39
49
- name : Upload Full Flash Image
40
50
uses : actions/upload-artifact@v4
41
51
with :
42
- name : Full Flash Image
52
+ name : Full Flash Image (${{ matrix.esp-variant }})
43
53
path : build/ble2mqtt-full.bin
54
+
55
+ - name : Upload Release
56
+ if : github.event_name == 'release' && github.event.action == 'created'
57
+ env :
58
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59
+ run : |
60
+ sudo cp build/ble2mqtt-full.bin ble2mqtt-full.${{ matrix.esp-variant }}.bin
61
+ sudo cp build/ble2mqtt.bin ble2mqtt.${{ matrix.esp-variant }}.bin
62
+ gh release upload ${GITHUB_REF#refs/tags/} ble2mqtt-full.${{ matrix.esp-variant }}.bin
63
+ gh release upload ${GITHUB_REF#refs/tags/} ble2mqtt.${{ matrix.esp-variant }}.bin
You can’t perform that action at this time.
0 commit comments