Skip to content

Commit

Permalink
Improve archive_build.yml
Browse files Browse the repository at this point in the history
- Use env variable for FW version
- Test FW presence
- Errors handling
  • Loading branch information
jpcornil-git committed Nov 3, 2024
1 parent 3533d16 commit 057ccf7
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/archive_build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
name: Archive Build
on: [push, pull_request]
env:
AYAB_VERSION: v1.1.0
jobs:
archive:
runs-on: ubuntu-latest
steps:
- name: Fetch binary
run: wget https://github.com/jpcornil-git/ayabAsync-firmware/releases/download/v1.1.0/firmware_uno_1_1_0.hex
env:
firmwareUrl : https://github.com/jpcornil-git/ayabAsync-firmware/releases/download/${{ env.AYAB_VERSION }}/firmware_uno_1_1_0.hex
run: |
set -e
if ! wget --spider ${firmwareUrl}; then
echo "Error: Firmware file not found"
exit 1
fi
wget ${firmwareUrl}
- name: Verify hex file presence
run: |
if [ ! -f ./*.hex ]; then
echo "Error: No hex file found"
exit 1
fi
- name: Archive build
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 057ccf7

Please sign in to comment.