Skip to content

Commit e3cd6d1

Browse files
committed
build: update workflow, add wemos and c3
1 parent beca852 commit e3cd6d1

File tree

1 file changed

+48
-38
lines changed

1 file changed

+48
-38
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and Release
33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- "v*.*.*"
77
branches:
88
- main
99
pull_request:
@@ -16,12 +16,12 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout Repository
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020

2121
- name: Set up Python environment
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2323
with:
24-
python-version: '3.10'
24+
python-version: "3.10"
2525

2626
- name: Install PlatformIO
2727
run: |
@@ -33,13 +33,13 @@ jobs:
3333
mkdir -p include
3434
cat <<EOL > include/secrets.h
3535
#pragma once
36-
#define WIFI_HOSTNAME "ikealedmatrix"
36+
#define WIFI_HOSTNAME "ikea-led"
3737
#ifdef ESP8266
3838
#define WIFI_SSID "WifiForIkeaLamp"
3939
#define WIFI_PASSWORD "WifiPasswordForIkeaLamp"
4040
#endif
4141
#define OTA_USERNAME "admin"
42-
#define OTA_PASSWORD "password"
42+
#define OTA_PASSWORD "ikea-led-wall"
4343
EOL
4444
4545
- name: Install dependencies
@@ -68,23 +68,25 @@ jobs:
6868
continue-on-error: true
6969
strategy:
7070
matrix:
71-
environment: [nodemcuv2, d1_mini_pro-ota, ESP32-wemos]
71+
environment: [nodemcuv2, d1_mini_pro-ota, ESP32-wemos, esp32c3]
7272
include:
7373
- environment: nodemcuv2
7474
artifact_name: nodemcuv2_firmware
7575
- environment: d1_mini_pro-ota
7676
artifact_name: d1_mini_pro_ota_firmware
7777
- environment: ESP32-wemos
7878
artifact_name: ESP32-wemos_firmware
79+
- environment: esp32c3
80+
artifact_name: esp32c3_firmware
7981

8082
steps:
8183
- name: Checkout Repository
82-
uses: actions/checkout@v2
84+
uses: actions/checkout@v4
8385

8486
- name: Set up Python environment
85-
uses: actions/setup-python@v2
87+
uses: actions/setup-python@v5
8688
with:
87-
python-version: '3.10'
89+
python-version: "3.10"
8890

8991
- name: Install PlatformIO
9092
run: |
@@ -96,13 +98,13 @@ jobs:
9698
mkdir -p include
9799
cat <<EOL > include/secrets.h
98100
#pragma once
99-
#define WIFI_HOSTNAME "ikealedmatrix"
101+
#define WIFI_HOSTNAME "ikea-led"
100102
#ifdef ESP8266
101103
#define WIFI_SSID "WifiForIkeaLamp"
102104
#define WIFI_PASSWORD "WifiPasswordForIkeaLamp"
103105
#endif
104106
#define OTA_USERNAME "admin"
105-
#define OTA_PASSWORD "password"
107+
#define OTA_PASSWORD "ikea-led-wall"
106108
EOL
107109
108110
- name: Install dependencies
@@ -127,62 +129,70 @@ jobs:
127129
name: ${{ matrix.artifact_name }}
128130
path: ./builds/${{ matrix.artifact_name }}.bin
129131

130-
131132
release:
132133
name: Create GitHub Release
133134
runs-on: ubuntu-latest
134135
needs: [build_esp32dev, build_optional]
135136
if: startsWith(github.ref, 'refs/tags/')
136137
steps:
137138
- name: Checkout Repository
138-
uses: actions/checkout@v2
139+
uses: actions/checkout@v4
139140

140141
- name: Download ESP32 firmware
141142
uses: actions/download-artifact@v4
142143
with:
143144
name: esp32dev_firmware
144-
path: ./builds/ # specify a target directory
145+
path: ./builds/ # specify a target directory
145146

146147
- name: Download ESP8266 firmware (nodemcuv2)
147148
uses: actions/download-artifact@v4
148149
continue-on-error: true
149150
with:
150151
name: nodemcuv2_firmware
151-
path: ./builds/ # specify a target directory
152+
path: ./builds/ # specify a target directory
152153

153154
- name: Download ESP8266 firmware (d1_mini_pro-ota)
154155
uses: actions/download-artifact@v4
155156
continue-on-error: true
156157
with:
157158
name: d1_mini_pro_ota_firmware
158-
path: ./builds/ # specify a target directory
159+
path: ./builds/ # specify a target directory
159160

160-
- name: Get version from tag
161-
id: get_version
162-
run: |
163-
VERSION=${GITHUB_REF##*/}
164-
echo "VERSION=$VERSION" >> $GITHUB_ENV
161+
- name: Download ESP32-wemos firmware
162+
uses: actions/download-artifact@v4
163+
continue-on-error: true
164+
with:
165+
name: ESP32-wemos_firmware
166+
path: ./builds/ # specify a target directory
167+
168+
- name: Download ESP32-C3 firmware
169+
uses: actions/download-artifact@v4
170+
continue-on-error: true
171+
with:
172+
name: esp32c3_firmware
173+
path: ./builds/ # specify a target directory
165174

166175
- name: Create GitHub Release
167-
uses: softprops/action-gh-release@v1
176+
uses: softprops/action-gh-release@v2
168177
with:
169-
tag_name: ${{ env.VERSION }}
170-
name: Pre-release ${{ env.VERSION }}
171178
draft: true
172179
prerelease: true
180+
name: Release ${{ github.ref_name }}
173181
body: |
174182
This is a prerelease version of the firmware.
175-
Credentials for OTA updates:
176-
- Username: admin
177-
- Password: password
178-
Credentials for WiFi connection:
179-
- SSID: WifiForIkeaLamp
180-
- Password: WifiPasswordForIkeaLamp
181-
Note: If the device cannot connect to the WiFi network (ESP32 only), it will create an access point.
182-
Default hostname: ikealedmatrix
183-
files: |
184-
./builds/esp32dev_firmware.bin
185-
./builds/nodemcuv2_firmware.bin
186-
./builds/d1_mini_pro_ota_firmware.bin
183+
184+
## Installation
185+
Flash the appropriate firmware binary for your device. https://github.com/ph1p/ikea-led-obegraensad?tab=readme-ov-file#ota-updates
186+
187+
## Default Configuration
188+
- **Hostname:** ikea-led
189+
- **OTA Username:** admin
190+
- **OTA Password:** ikea-led-wall
191+
- **WiFi SSID:** WifiForIkeaLamp (ESP8266 only)
192+
- **WiFi Password:** WifiPasswordForIkeaLamp (ESP8266 only)
193+
194+
**Note:** ESP32 devices will create an access point if unable to connect to WiFi.
195+
files: ./builds/*.bin
196+
fail_on_unmatched_files: false
187197
env:
188-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
198+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)