Add Arduino rewrite of firmware
This commit is contained in:
69
.github/workflows/arduino.yaml
vendored
Executable file
69
.github/workflows/arduino.yaml
vendored
Executable file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
name: arduino
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
permissions: write-all
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arduino-platform: ["esp8266:esp8266"]
|
||||
include:
|
||||
- arduino-platform: "esp8266:esp8266"
|
||||
fqbn: "esp8266:esp8266:generic"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup Arduino CLI
|
||||
uses: arduino/setup-arduino-cli@v1
|
||||
|
||||
- name: Install platform
|
||||
run: >
|
||||
arduino-cli core install
|
||||
--additional-urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json
|
||||
${{ matrix.arduino-platform }}
|
||||
|
||||
- name: Install time lib
|
||||
run: arduino-cli lib install time wifimanager ezTime
|
||||
|
||||
- name: Make timezones
|
||||
run: python firmware/cities.py > firmware/cities.h
|
||||
|
||||
- name: Compile Sketch
|
||||
run: >
|
||||
arduino-cli compile --fqbn ${{ matrix.fqbn }} -e
|
||||
firmware
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./firmware/build/esp8266.esp8266.generic/firmware.ino.bin
|
||||
asset_name: nixiesp12.bin
|
||||
asset_content_type: application/bin
|
||||
Reference in New Issue
Block a user