Skip to content

Commit

Permalink
Create Build and Release workflows (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
awonak authored Aug 12, 2023
1 parent 043c52b commit ee81dd3
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Build and release
on: [push, pull_request]

jobs:
build_arythmatik:
runs-on: ubuntu-latest
strategy:
matrix:
module: ["A-RYTH-MATIK"]
firmware: ["Certainty", "Uncertainty"]

steps:
- name: Clone repo
uses: actions/checkout@master

- name: Setup Arduino CLI
uses: arduino/[email protected]

- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install arduino:avr
arduino-cli lib install "Adafruit GFX Library"
arduino-cli lib install "Adafruit SSD1306"
arduino-cli lib install SimpleRotary
- name: Compile Sketch
working-directory: ./${{ matrix.module}}
run: |
arduino-cli compile -v -b arduino:avr:nano ${{ matrix.firmware}} -e --output-dir=./build
mkdir -p ./release && cp ./build/${{ matrix.firmware }}.ino.hex ./release/${{ matrix.module}}_${{ matrix.firmware }}.hex
- name: Upload bin
uses: actions/upload-artifact@v2
with:
name: release-artifacts
path: ./${{ matrix.module}}/release/${{ matrix.module}}_${{ matrix.firmware }}.hex


build_synclfo:
runs-on: ubuntu-latest
strategy:
matrix:
module: ["SyncLFO"]
firmware: ["ADSR", "Baby4", "GenerativeSequencer", "MultiModeEnv", "Polyrhythm"]

steps:
- name: Clone repo
uses: actions/checkout@master

- name: Setup Arduino CLI
uses: arduino/[email protected]

- name: Install platform
run: |
arduino-cli core update-index
arduino-cli core install arduino:avr
- name: Compile Sketch
working-directory: ./${{ matrix.module}}
run: |
ARDUINO_DIRECTORIES_USER=$GITHUB_WORKSPACE/${{ matrix.module}} arduino-cli compile -v -b arduino:avr:nano ${{ matrix.firmware}} -e --output-dir=./build
mkdir -p ./release && cp ./build/${{ matrix.firmware }}.ino.hex ./release/${{ matrix.module}}_${{ matrix.firmware }}.hex
- name: Upload bin
uses: actions/upload-artifact@v2
with:
name: release-artifacts
path: ./${{ matrix.module}}/release/${{ matrix.module}}_${{ matrix.firmware }}.hex

release:
needs: [build_arythmatik, build_synclfo]

runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@master
with:
name: release-artifacts
path: releases/

- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: releases/*.hex

0 comments on commit ee81dd3

Please sign in to comment.