Build Lawndon #6
Workflow file for this run
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 Lawndon | |
on: | |
workflow_dispatch: | |
release: | |
types: [released] | |
jobs: | |
build-lawndon: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Arduino cli | |
uses: arduino/setup-arduino-cli@v2 | |
- name: Install libraries | |
run: | | |
arduino-cli lib install IBusBM Servo | |
- name: Compile Lawndon | |
uses: arduino/compile-sketches@v1 | |
with: | |
fqbn: "arduino:avr:mega" | |
libraries: | | |
- name: IBusBM | |
- name: Servo | |
sketch-paths: | | |
- ./lawndon | |
enable-warnings-report: true | |
verbose: false | |
cli-compile-flags: | | |
- --export-binaries | |
- name: Package build | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
for dir in ./lawndon/build/*; do | |
if [ -d "${dir}" ]; then | |
tar -czvf "${dir}.tar.gz" -C "${dir}" . | |
fi | |
done | |
- name: Release build | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
lawndon/build/*.tar.gz | |
build-lawndon-pi: | |
runs-on: ubuntu-latest | |
needs: build-lawndon | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Package application | |
working-directory: ./pi | |
run: | | |
bash package.sh | |
- name: Upload release assets | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./pi/lawndon-pi.tar.gz |