fix: release workflow #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Inject slug/short variables | |
uses: rlespinasse/github-slug-action@v4 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Cache pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install platformio | |
pip install wheel | |
- name: Cache PlatformIO | |
uses: actions/cache@v3 | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-platformio | |
- name: Install NodeJS | |
uses: oven-sh/setup-bun@v1 | |
- name: Install WebUI dependencies | |
run: | | |
cd web-ui | |
bun install | |
- name: Build WebUI | |
run: | | |
cd web-ui | |
bun run build | |
- name: Run PlatformIO | |
run: | | |
mkdir -p ~/artifacts/firmware | |
platformio pkg install --platform native | |
platformio pkg update | |
pio run --environment betafpv-elrs-lite-24_uart | |
pio run --target buildfs --environment betafpv-elrs-lite-24_uart | |
OUTDIR=~/artifacts/firmware/LBT/betafpv-elrs-lite-24_uart | |
mkdir -p $OUTDIR | |
mv .pio/build/betafpv-elrs-lite-24_uart/firmware.bin $OUTDIR/firmware.bin >& /dev/null || : | |
mv .pio/build/betafpv-elrs-lite-24_uart/littlefs.bin $OUTDIR/filesystem.bin >& /dev/null || : | |
- name: Store Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: firmware | |
path: ~/artifacts/**/* | |
continue-on-error: true | |