-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from h2zero/update-build-script
Update build scripts and add workflows for PR/release.
- Loading branch information
Showing
6 changed files
with
143 additions
and
89 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,23 @@ | ||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-upload: | ||
runs-on: ubuntu-latest | ||
name: Build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install build tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install libusb-1.0-0 cmake srecord | ||
pip install -U pyserial | ||
- name: Build | ||
run: ./scripts/build-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,43 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build-upload: | ||
runs-on: ubuntu-latest | ||
name: Build | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
|
||
- name: Install build tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install libusb-1.0-0 cmake srecord | ||
pip install -U pyserial | ||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Prepare Release Assets | ||
run: | | ||
./scripts/build-firmware | ||
mkdir assets | ||
cp build/konnected-esp8266-latest.bin assets/konnected-esp8266-${{ steps.get_release.outputs.tag_name }}.bin | ||
- name: Upload asset to release | ||
uses: bgpat/release-asset-action@03b0c30db1c4031ce3474740b0e4275cd7e126a3 | ||
with: | ||
pattern: "assets/*" | ||
release-url: ${{ steps.get_release.outputs.upload_url }} | ||
allow-overwrite: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -48,3 +48,6 @@ firmware/builds | |
|
||
# Private files | ||
private | ||
|
||
# NodeMCU | ||
nodemcu-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
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
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