Skip to content

Commit 6ebee2a

Browse files
committed
Release builds for other ESP32 variants
Closes #204
1 parent 7309f13 commit 6ebee2a

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@ on:
66
pull_request:
77
branches: [ master ]
88
release:
9-
types: [ published ]
9+
types: [ created ]
1010
workflow_dispatch:
1111

1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
strategy:
18+
matrix:
19+
esp-variant:
20+
- esp32
21+
- esp32-s3
22+
- esp32-c3
1523
steps:
1624
- name: Checkout
1725
uses: actions/checkout@v3
@@ -22,22 +30,34 @@ jobs:
2230
uses: espressif/[email protected]
2331
with:
2432
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
2636
2737
- name: Upload Application Image
2838
uses: actions/upload-artifact@v4
2939
with:
30-
name: Application
40+
name: Application (${{ matrix.esp-variant }})
3141
path: build/ble2mqtt.bin
3242

3343
- name: Upload Filesystem Image
3444
uses: actions/upload-artifact@v4
3545
with:
36-
name: File System
46+
name: File System (${{ matrix.esp-variant }})
3747
path: build/fs_0.bin
3848

3949
- name: Upload Full Flash Image
4050
uses: actions/upload-artifact@v4
4151
with:
42-
name: Full Flash Image
52+
name: Full Flash Image (${{ matrix.esp-variant }})
4353
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

0 commit comments

Comments
 (0)