ci: add build & release workflow
This commit is contained in:
92
.github/workflows/release.yml
vendored
Normal file
92
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
name: Build & Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: espressif/idf:v5.5.2
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build firmware
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
. $IDF_PATH/export.sh
|
||||||
|
idf.py set-target esp32s3
|
||||||
|
idf.py build
|
||||||
|
|
||||||
|
- name: Prepare release artifacts
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
. $IDF_PATH/export.sh
|
||||||
|
VERSION="${GITHUB_REF_NAME}"
|
||||||
|
|
||||||
|
# Generate merged firmware for single-command flashing
|
||||||
|
esptool.py --chip esp32s3 merge_bin \
|
||||||
|
--flash_mode qio \
|
||||||
|
--flash_size 16MB \
|
||||||
|
--flash_freq 80m \
|
||||||
|
-o "mimiclaw-full-${VERSION}.bin" \
|
||||||
|
0x0 build/bootloader/bootloader.bin \
|
||||||
|
0x8000 build/partition_table/partition-table.bin \
|
||||||
|
0xf000 build/ota_data_initial.bin \
|
||||||
|
0x20000 build/mimiclaw.bin
|
||||||
|
|
||||||
|
# Copy individual binaries with version suffix
|
||||||
|
cp build/mimiclaw.bin "mimiclaw-${VERSION}.bin"
|
||||||
|
cp build/bootloader/bootloader.bin "bootloader-${VERSION}.bin"
|
||||||
|
cp build/partition_table/partition-table.bin "partition-table-${VERSION}.bin"
|
||||||
|
cp build/ota_data_initial.bin "ota_data_initial-${VERSION}.bin"
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
generate_release_notes: true
|
||||||
|
body: |
|
||||||
|
## Flashing Guide
|
||||||
|
|
||||||
|
### 1. Merged firmware (easiest)
|
||||||
|
|
||||||
|
Download `mimiclaw-full-${{ github.ref_name }}.bin` and flash with a single command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
esptool.py --chip esp32s3 -b 460800 write_flash 0x0 mimiclaw-full-${{ github.ref_name }}.bin
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Individual binaries (advanced)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
esptool.py --chip esp32s3 -b 460800 write_flash \
|
||||||
|
0x0 bootloader-${{ github.ref_name }}.bin \
|
||||||
|
0x8000 partition-table-${{ github.ref_name }}.bin \
|
||||||
|
0xf000 ota_data_initial-${{ github.ref_name }}.bin \
|
||||||
|
0x20000 mimiclaw-${{ github.ref_name }}.bin
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. OTA update (for devices already running MimiClaw)
|
||||||
|
|
||||||
|
Upload `mimiclaw-${{ github.ref_name }}.bin` via the OTA endpoint.
|
||||||
|
|
||||||
|
### 4. First-time setup
|
||||||
|
|
||||||
|
After flashing, connect via serial (115200 baud) and configure:
|
||||||
|
|
||||||
|
```
|
||||||
|
wifi <ssid> <password>
|
||||||
|
tg_token <your-telegram-bot-token>
|
||||||
|
api_key <your-anthropic-api-key>
|
||||||
|
reboot
|
||||||
|
```
|
||||||
|
files: |
|
||||||
|
mimiclaw-full-${{ github.ref_name }}.bin
|
||||||
|
mimiclaw-${{ github.ref_name }}.bin
|
||||||
|
bootloader-${{ github.ref_name }}.bin
|
||||||
|
partition-table-${{ github.ref_name }}.bin
|
||||||
|
ota_data_initial-${{ github.ref_name }}.bin
|
||||||
Reference in New Issue
Block a user