This commit is contained in:
46
.gitea/workflows/ota-build.yml
Normal file
46
.gitea/workflows/ota-build.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
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: Build filesystem-aware OTA package
|
||||
run: python scripts/build_ota_package.py
|
||||
|
||||
- name: Collect OTA artifacts
|
||||
run: |
|
||||
mkdir -p dist/ota
|
||||
find dist -maxdepth 1 -type f -name '*.tslpkg' -exec cp {} dist/ota/ \;
|
||||
find .pio/build -type f \( -name 'firmware.bin' -o -name 'littlefs.bin' \) -exec cp {} dist/ota/ \;
|
||||
if ! find dist/ota -maxdepth 1 -type f -name '*.tslpkg' | grep -q .; then
|
||||
echo 'No .tslpkg OTA package was produced.' >&2
|
||||
exit 1
|
||||
fi
|
||||
find dist/ota -maxdepth 1 -type f | sort
|
||||
|
||||
- name: Upload OTA artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ota-package
|
||||
path: dist/ota/*
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user