From 1988d526fcee04d5be213e8f4dc202def843dac1 Mon Sep 17 00:00:00 2001 From: Matteo Crippa Date: Fri, 19 Apr 2024 23:55:07 +0200 Subject: [PATCH] test export --- .github/workflows/release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95cc963..97bee75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,7 @@ jobs: - name: Archive Artifacts run: | mkdir -p artifacts - # Define the mapping of board names to file prefixes and addresses + # Define the mapping of board names to file prefixes declare -A board_map=( ["esp8266"]="0x0000_firmware" ["geekmagic-smalltv"]="0x0000_firmware" @@ -58,10 +58,9 @@ jobs: # Iterate through each board and copy corresponding files for board in "${!board_map[@]}"; do - for address in ${board_map[$board]}; do - address_prefix=$(echo $address | cut -d'_' -f1) - file_type=$(echo $address | cut -d'_' -f2) - find .pio/build -name "${file_type}.bin" -exec sh -c 'cp "{}" "artifacts/'"${address_prefix}_${file_type}_${board}"'_$(basename $(dirname {})).bin"' \; + address_prefix=$(echo "${board_map[$board]}" | cut -d'_' -f1) + for file_type in ${board_map[$board]}; do + find .pio/build -path "*${board}*" -name "${file_type}.bin" -exec sh -c 'cp "{}" "artifacts/'"${address_prefix}_${file_type}.bin"' \; done done working-directory: ${{ github.workspace }}