Skip to content

Commit

Permalink
Add github workflow for buildsing (#14)
Browse files Browse the repository at this point in the history
* Add github workflow for building
  • Loading branch information
hmaarrfk authored Oct 12, 2022
1 parent febb48c commit 9195eb9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Firmware
on: [push, pull_request]

jobs:
build:
strategy:
matrix:
teensy: ['32', '40']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow --tags
git describe --dirty --tags
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
pip install platformio
- name: Build firmware
run: |
platformio run --environment teensy${{ matrix.teensy }}
cp .pio/build/teensy${{ matrix.teensy }}/firmware.hex firmware_teensy${{ matrix.teensy }}.hex
- name: Upload artifact
if: always()
uses: actions/upload-artifact@v3
with:
path: |
firmware_teensy${{ matrix.teenxy }}.hex
- name: Upload firmware to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./firmware_teensy${{ matrix.teenxy }}.hex
tag: ${{ github.ref }}
overwrite: true
file_glob: true
if: startsWith(github.ref, 'refs/tags/')
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

0 comments on commit 9195eb9

Please sign in to comment.