Switch to PlatformIO #2
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: PlatformIO Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
pkgfile: ${{ steps.pkgname.outputs.pkgfile }} | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt update -qq | |
sudo apt install -yqq python3 | |
pip install -U platformio | |
- name: Update PlatformIO | |
run: | | |
cd "$(realpath "$GITHUB_WORKSPACE")" | |
pio pkg update | |
- name: Build firmware | |
run: | | |
platformio run | |
- name: Upload files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bin | |
path: ".pio/build/firmware.bin" | |
- name: Release build artifacts | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./.pio/build/firmware.bin | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |