From 1855bb9925bc4bb0a6a2dd8f88276cba0c9215a0 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Fri, 4 Sep 2020 19:19:38 +0200 Subject: [PATCH] try to fix auto rename of output files --- .github/workflows/build-all.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-all.yml b/.github/workflows/build-all.yml index 94d64de1..61d63579 100755 --- a/.github/workflows/build-all.yml +++ b/.github/workflows/build-all.yml @@ -1,9 +1,4 @@ -# -# test-builds.yml -# Do test builds to catch compile errors -# - -name: CI +name: Build All Firmware Variants on: #pull_request: @@ -95,9 +90,15 @@ jobs: - name: Run PlatformIO run: platformio run --environment ${{ matrix.platform }} + - name: Rename Output Files + run: | + CUSTOM_BUILD_VERSION=$(egrep -o "([0-9]{1,}\.)+[0-9]{1,}" Marlin/src/inc/Version.h -m2 | tail -n1) + mv .pio/build/${{ matrix.platform }}/firmware.hex .pio/build/${{ matrix.platform }}/${{ matrix.platform }}_v$CUSTOM_BUILD_VERSION.hex + done + - name: Archive production artifacts uses: actions/upload-artifact@master with: - name: ${{ matrix.platform }}.hex + name: ${{ matrix.platform }} path: | - .pio/build/${{ matrix.platform }}/firmware.hex + .pio/build/${{ matrix.platform }}/${{ matrix.platform }}_v*.hex