Skip to content

Commit

Permalink
Merge pull request #33 from groundlight/credentials-refactor-fix
Browse files Browse the repository at this point in the history
updated workflows to test build for all targets on any branch push but generate release only on push to main
  • Loading branch information
positavi authored Feb 29, 2024
2 parents c81e563 + 004c1b9 commit 475cc7f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/make_binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,34 @@ jobs:
- name: Build PlatformIO Project
run: pio run

- name: Copy binaries to /firmware
run: bash copy_firmware.sh

- name: Upload binaries for use in release step if needed
uses: actions/upload-artifact@v3
with:
name: firmware
path: firmware


deploy_release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3

- name: Copy binaries to /firmware
run: bash copy_firmware.sh
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: firmware

- name: List workspace directory
run: ls -la

- name: Create release and upload binary
- name: Create release and upload binaries
run: |
gh release create v0.0.${{github.run_number}} firmware/*
gh release create v0.0.${{github.run_number}} *.bin
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash
shell: bash
5 changes: 4 additions & 1 deletion copy_firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ for f in $(ls -d *)
do
echo $f
cp $f/firmware.bin ../../firmware/firmware_$f.bin
done
done
echo "Contents of firmware directory:"
cd ../../
ls -l firmware
Binary file removed firmware/firmware_esp32cam.bin
Binary file not shown.
Binary file removed firmware/firmware_giveaway-unit.bin
Binary file not shown.
Binary file removed firmware/firmware_m5stack-timer-cam.bin
Binary file not shown.
Binary file removed firmware/firmware_seeed_xiao_esp32s3.bin
Binary file not shown.

0 comments on commit 475cc7f

Please sign in to comment.