From 4f9bcbaab3aba5ecd4018047c604b07527adb620 Mon Sep 17 00:00:00 2001 From: Matteo Crippa Date: Tue, 23 Apr 2024 09:24:19 +0200 Subject: [PATCH] tweak release script --- .github/workflows/release.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba4c505..9bd3b01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,13 +54,24 @@ jobs: - name: Archive OTA ESP32 run: | - find .pio/build -name "firmware.bin" -exec sh -c 'cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin "artifacts/0xe000_boot_$(basename $(dirname {})).bin"' \; + declare -A board_map=( + ["esp32"]="0xe000_boot" + ["esp32-s2"]="0xe000_boot" + ["esp32-s3"]="0xe000_boot" + ["lilygo-t-display-s3"]="0xe000_boot" + ) + for board in "${!board_map[@]}"; do + if [ ! -d ".pio/build/$board" ]; then + continue + fi + find .pio/build/$board -name "firmware.bin" -exec sh -c 'cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin "artifacts/'"${board_map[$board]}_$(basename $(dirname {})).bin"'"' \; + rm -rf .pio/build/$board + done working-directory: ${{ github.workspace }} - name: Archive Artifacts with Address run: | - # Define the mapping of board names to file prefixes declare -A board_map=( ["esp8266"]="0x0000_firmware" ["geekmagic-smalltv"]="0x0000_firmware"