Skip to content

Release

Release #8

Workflow file for this run

name: Release
on:
release: # This workflow will run only when a new release is created
types: [created, edited]
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
OUTDIR=./artifacts/betafpv-elrs-lite-24_ota
mkdir -p $OUTDIR
pio run --environment betafpv-elrs-lite-24_ota
mv .pio/build/betafpv-elrs-lite-24_ota/firmware.bin $OUTDIR/firmware.bin >& /dev/null || :
pio run --target buildfs --environment betafpv-elrs-lite-24_ota
mv .pio/build/betafpv-elrs-lite-24_ota/littlefs.bin $OUTDIR/filesystem.bin >& /dev/null || :
- name: Bundle / Zip Artifacts directory
run: |
cd ./artifacts
zip -r artifacts.zip .
- name: Debugging log files
run: |
ls -la
ls -la ./artifacts
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RH_OSD_INJECTOR_RELEASE_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./artifacts/artifacts.zip
asset_name: rh-osd-injector-${{ github.ref }}.zip
asset_content_type: application/zip