-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23f1ca8
commit a144e31
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
name: build firmware | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: linter | ||
run: | | ||
pip install cpplint | ||
make lint | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: install platformio | ||
run: | | ||
pip install platformio==5.0.3 | ||
- name: build firmware | ||
run: | | ||
export PLATFORMIO_BUILD_DIR=$HOME/build | ||
make ci | ||
mkdir firmware | ||
cp $PLATFORMIO_BUILD_DIR/pro16MHzatmega328/firmware.hex firmware/ | ||
- name: upload artifacts | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: firmware | ||
path: firmware/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
on: | ||
release: | ||
types: [created] | ||
|
||
name: Upload release assets after release is created | ||
jobs: | ||
build: | ||
name: create assets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: install platformio | ||
run: | | ||
pip install platformio==5.0.3 | ||
- name: build firmware | ||
run: | | ||
export PLATFORMIO_BUILD_DIR=$HOME/build | ||
make ci | ||
mkdir firmware | ||
cp $PLATFORMIO_BUILD_DIR/pro16MHzatmega328/firmware.hex firmware/ | ||
- name: Upload release assets | ||
uses: skx/github-action-publish-binaries@c881a3f8ffb80b684f367660178d38ceabc065c2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
args: './firmware/*' |
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