53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: ESP-IDF Build & Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: espressif/idf:latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build firmware
|
|
shell: bash
|
|
run: |
|
|
. /opt/esp/idf/export.sh
|
|
|
|
idf.py set-target esp32
|
|
idf.py build
|
|
|
|
- name: Prepare release files
|
|
shell: bash
|
|
run: |
|
|
mkdir -p release
|
|
|
|
cp build/*.bin release/
|
|
cp build/bootloader/*.bin release/ 2>/dev/null || true
|
|
cp build/partition_table/*.bin release/ 2>/dev/null || true
|
|
|
|
echo "Release files:"
|
|
ls -lh release/
|
|
|
|
- name: Create release
|
|
uses: akkuman/gitea-release-action@v1
|
|
with:
|
|
server_url: ${{ github.server_url }}
|
|
repository: ${{ github.repository }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag_name: "build-${{ github.sha }}"
|
|
name: "ESP32 build ${{ github.sha }}"
|
|
body: |
|
|
Automated ESP-IDF firmware build.
|
|
|
|
Commit: ${{ github.sha }}
|
|
files: |
|
|
release/*.bin
|