pio: Update to teensy platform 5.0 #208
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: | |
pull_request: | |
branches: | |
- master | |
- dev | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BUILD_TAG: 0 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
pip install platformio | |
export BUILD_TAG=build-$(date -u +'%Y%m%d%H%M') | |
echo "BUILD_TAG=$BUILD_TAG" >> $GITHUB_ENV | |
- name: Compile code | |
run: platformio run -e teensy41 | |
- if: github.event_name == 'push' | |
name: Create Release | |
id: create_release | |
uses: "actions/create-release@v1" | |
with: | |
tag_name: ${{ env.BUILD_TAG }} | |
release_name: ${{ env.BUILD_TAG }} | |
draft: false | |
prerelease: false | |
- if: github.event_name == 'push' | |
name: Upload binary to release | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: .pio/build/teensy41/firmware.hex | |
asset_name: firmware-teensy41.hex | |
asset_content_type: application/hex |