fix: switch OTA delivery to direct attached artifacts
Some checks failed
OTA build / build-ota (push) Failing after 2m4s
Some checks failed
OTA build / build-ota (push) Failing after 2m4s
This commit is contained in:
@@ -36,19 +36,20 @@ jobs:
|
|||||||
timestamp="$(date -u +%Y-%m-%dT%H-%M-%SZ)"
|
timestamp="$(date -u +%Y-%m-%dT%H-%M-%SZ)"
|
||||||
mkdir -p dist/ota
|
mkdir -p dist/ota
|
||||||
found=0
|
found=0
|
||||||
for fw in .pio/build/*/firmware.bin; do
|
for fw in .pio/build/*/firmware.bin .pio/build/*/firmware.hex; do
|
||||||
[ -f "$fw" ] || continue
|
[ -f "$fw" ] || continue
|
||||||
env_name="$(basename "$(dirname "$fw")")"
|
env_name="$(basename "$(dirname "$fw")")"
|
||||||
cp "$fw" "dist/ota/${project_name}_${env_name}_${timestamp}.bin"
|
ext="${fw##*.}"
|
||||||
|
cp "$fw" "dist/ota/${project_name}_${env_name}_${timestamp}.${ext}"
|
||||||
found=1
|
found=1
|
||||||
done
|
done
|
||||||
if [ "$found" -eq 0 ]; then
|
if [ "$found" -eq 0 ]; then
|
||||||
echo 'No firmware.bin artifacts were produced.' >&2
|
echo 'No firmware.bin or firmware.hex artifacts were produced.' >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
find dist/ota -maxdepth 1 -type f | sort
|
find dist/ota -maxdepth 1 -type f | sort
|
||||||
|
|
||||||
- name: Upload direct OTA files
|
- name: Upload direct OTA files as artifacts
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ota-files
|
name: ota-files
|
||||||
|
|||||||
Reference in New Issue
Block a user