From c884c035a2cd74283ada499527017dc43233e86b Mon Sep 17 00:00:00 2001 From: William Emfinger Date: Mon, 22 Jun 2026 09:26:38 -0500 Subject: [PATCH] feat: Improve packaging to upload artifacts as single zip --- .github/workflows/package_main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/package_main.yml b/.github/workflows/package_main.yml index 282efa2..7265966 100644 --- a/.github/workflows/package_main.yml +++ b/.github/workflows/package_main.yml @@ -33,6 +33,8 @@ jobs: uses: actions/checkout@v4 with: submodules: true + fetch-tags: true + ref: ${{ github.ref }} - name: Build Main Code (${{ matrix.board }}) uses: espressif/esp-idf-ci-action@v1 @@ -53,22 +55,20 @@ jobs: build/flasher_args.json build/flash_args - - name: Stage release files (${{ matrix.board }}) + - name: Zip up build files for release using matrix board name + release tag name (${{ matrix.board }}) if: ${{ github.event.release && github.event.action == 'published' }} + shell: bash run: | - mkdir -p release - cp build/camera-streamer.bin release/camera-streamer_${{ matrix.board }}.bin - cp build/camera-streamer.elf release/camera-streamer_${{ matrix.board }}.elf - cp build/bootloader/bootloader.bin release/bootloader_${{ matrix.board }}.bin - cp build/partition_table/partition-table.bin release/partition-table_${{ matrix.board }}.bin - cp build/flasher_args.json release/flasher_args_${{ matrix.board }}.json + # zip up just the files we uploaded for the release + zip_name="camera-streamer-${{ matrix.board }}_$(git describe --tags --dirty).zip" + zip -r -j $zip_name build/*.bin build/*.elf build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flasher_args.json build/flash_args + echo "artifact_path=$zip_name" >> "$GITHUB_ENV" - name: Attach files to release (${{ matrix.board }}) uses: softprops/action-gh-release@v2 if: ${{ github.event.release && github.event.action == 'published' }} with: - files: | - release/* + files: ${{ env.artifact_path }} - name: Determine Size Delta (${{ matrix.board }}) # only run this if the release is published