ci(build): improve uf2 guard condition

Checking for the existence of the uf2 file is a more scalable solution.

PR: #461
This commit is contained in:
innovaker 2020-12-02 06:56:51 +00:00
parent 177b28f01d
commit 553289fd1e

View file

@ -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