Files
PlatformIO_Esp32C3Boilerplate/.gitea/workflows/ota-build.yml
Hermes 15238371e8
Some checks failed
OTA build / build-ota (push) Failing after 2m52s
fix: switch OTA delivery to direct attached artifacts
2026-08-30 12:08:12 -05:00

57 lines
1.3 KiB
YAML

name: OTA build
on:
push:
branches:
- '**'
workflow_dispatch:
jobs:
build-ota:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Remove stale OTA package files
run: rm -f dist/*.tslpkg
- name: Build filesystem-aware OTA package
run: python scripts/build_ota_package.py
- name: Prepare direct OTA files
run: |
set -eu
rm -rf dist/ota
mkdir -p dist/ota
count=0
for file in dist/*.tslpkg; do
[ -f "$file" ] || continue
cp "$file" dist/ota/
count=$((count+1))
done
if [ "$count" -eq 0 ]; then
echo 'No .tslpkg OTA package was produced.' >&2
exit 1
fi
find dist/ota -maxdepth 1 -type f | sort
- name: Upload direct OTA files as artifacts
uses: actions/upload-artifact@v7
with:
name: ota-files
path: dist/ota/*
if-no-files-found: error
archive: false