105 lines
3.2 KiB
YAML
105 lines
3.2 KiB
YAML
name: Release Firmware
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['*']
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- name: esp32
|
|
target: esp32
|
|
led_builtin: 2
|
|
bsp_config_gpio: 9
|
|
board_specific_init: boards/default.h
|
|
- name: xiao-esp32c6
|
|
target: esp32c6
|
|
led_builtin: 8
|
|
bsp_config_gpio: 0
|
|
board_specific_init: boards/xiao_esp32c6.h
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Build firmware (${{ matrix.name }})
|
|
run: |
|
|
docker build \
|
|
--build-arg TARGET=${{ matrix.target }} \
|
|
--build-arg LED_BUILTIN=${{ matrix.led_builtin }} \
|
|
--build-arg BSP_CONFIG_GPIO=${{ matrix.bsp_config_gpio }} \
|
|
--build-arg BOARD_SPECIFIC_INIT=${{ matrix.board_specific_init }} \
|
|
-t esp-scope-${{ matrix.name }} .
|
|
|
|
- name: Extract binary (${{ matrix.name }})
|
|
run: |
|
|
docker run --rm esp-scope-${{ matrix.name }} \
|
|
cat /workspace/build/esp-scope.bin > esp-scope-${{ matrix.name }}.bin
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: esp-scope-${{ matrix.name }}
|
|
path: esp-scope-${{ matrix.name }}.bin
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
|
|
- name: Set release tag
|
|
id: tag
|
|
run: |
|
|
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
|
echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
|
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "tag=latest" >> "$GITHUB_OUTPUT"
|
|
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ steps.tag.outputs.tag }}
|
|
prerelease: ${{ steps.tag.outputs.prerelease }}
|
|
body: |
|
|
## Firmware binaries
|
|
|
|
| File | Board | Target | LED GPIO | AP-Mode button GPIO |
|
|
|------|-------|--------|----------|---------------------|
|
|
| `esp-scope-esp32.bin` | Generic ESP32 | esp32 | 2 | 9 |
|
|
| `esp-scope-xiao-esp32c6.bin` | Seeed XIAO ESP32C6 | esp32c6 | 8 (built-in yellow LED) | 0 (Boot button) |
|
|
|
|
## Flashing
|
|
|
|
### Browser (easiest)
|
|
|
|
Download the `.bin` for your board above, then flash it in your browser — no drivers or tools needed:
|
|
|
|
👉 **[https://www.espboards.dev/tools/program/](https://www.espboards.dev/tools/program/)**
|
|
|
|
Works with Chrome, Edge, or Opera. Connect your ESP via USB, click **Connect to ESP**, select the `.bin` file, and flash.
|
|
|
|
### Command line
|
|
|
|
```bash
|
|
esptool.py -p <PORT> write_flash 0x0 esp-scope-<variant>.bin
|
|
```
|
|
|
|
Replace `<PORT>` with your serial port (e.g. `/dev/ttyUSB0` or `COM3`).
|
|
files: |
|
|
esp-scope-esp32/esp-scope-esp32.bin
|
|
esp-scope-xiao-esp32c6/esp-scope-xiao-esp32c6.bin
|