Skip to content

chore(deps): update dependency semantic-release-preconfigured-convent… #412

chore(deps): update dependency semantic-release-preconfigured-convent…

chore(deps): update dependency semantic-release-preconfigured-convent… #412

name: Build & Deploy
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
arduino-platform: ["arduino:avr"]
include:
# This works like this: when the platformn is "arduino:avr", the
# variable `fqbn` is set to "arduino:avr:uno".
- arduino-platform: "arduino:avr"
fqbn: "arduino:avr:mega"
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup Arduino CLI
uses: arduino/[email protected]
- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.arduino-platform }}
- name: Install libraries
run: |
arduino-cli lib install [email protected]
arduino-cli lib install [email protected]
arduino-cli lib install [email protected]
arduino-cli lib install [email protected]
- name: Compile Sketch
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./room_control_unit --warnings more
release:
concurrency:
# Allow only one release at a time.
group: release-${{ github.event.number || github.ref }}
needs:
- build
runs-on: ubuntu-latest
# Release only where secrets are available.
if: >-
!github.event.repository.fork
&& (
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name == github.repository
)
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
token: ${{ secrets.DEPLOYMENT_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.DEPLOYMENT_TOKEN }}
run: |
npm install
npx semantic-release
success:
runs-on: ubuntu-22.04
needs:
- build
- release
if: >-
always() && (
contains(join(needs.*.result, ','), 'failure')
|| !contains(join(needs.*.result, ','), 'cancelled')
)
steps:
- name: Verify that there were no failures
run: ${{ !contains(join(needs.*.result, ','), 'failure') }}