From 553289fd1eb1382f11bd1239e0edeb46af88a5e2 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Wed, 2 Dec 2020 06:56:51 +0000 Subject: [PATCH] ci(build): improve uf2 guard condition Checking for the existence of the uf2 file is a more scalable solution. PR: #461 --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f2d63e1..bdecaa02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,9 +91,17 @@ jobs: id: west-build with: args: 'build "-s app -b ${{ matrix.board }} -- -DSHIELD=${{ matrix.shield }}"' + - name: Check for uf2 + id: uf2-guard + run: | + UF2_FILE_EXISTS= + if [ -e "build/zephyr/zmk.uf2" ]; then + UF2_FILE_EXISTS=true + fi + echo ::set-output name=exists::${UF2_FILE_EXISTS} - name: Archive build uses: actions/upload-artifact@v2 - if: ${{ matrix.board != 'proton_c' }} + if: ${{ steps.uf2-guard.outputs.exists }} with: name: "${{ matrix.board }}-${{ matrix.shield }}-zmk-uf2" path: build/zephyr/zmk.uf2