Add github actions pipeline #1
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: Ka-Radio CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install platformio | |
- name: Install project dependencies | |
run: | | |
platformio update | |
platformio lib --global update | |
- name: Build project | |
run: platformio run | |
- name: Upload firmware (optional) | |
if: github.event_name == 'push' | |
run: platformio run --target upload | |
env: | |
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} |