Skip to content

Build

Build #31

Workflow file for this run

name: Build
on:
workflow_dispatch: # can be triggered manually
pull_request:
push: # automatically run on changes to following paths
paths:
- "**.lock"
- "config/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Calculate metadata
id: data
run: |
# Calculate
full="${{ github.sha }}"
short="${full:0:6}"
date="$(date --utc +'%Y-%m-%d_%H-%M-%s')"
# Print to output
echo "full=$full" >> $GITHUB_OUTPUT
echo "short=$short" >> $GITHUB_OUTPUT
echo "date=$date" >> $GITHUB_OUTPUT
echo "name_suffix=_${date}_${short}" >> $GITHUB_OUTPUT
# Print to stdout too
echo Metadata:
echo $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Install nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup nix cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build Glove80 firmware
run: nix build
- name: Upload
uses: actions/upload-artifact@v4
with:
name: glove80${{ steps.data.outputs.name_suffix }}.uf2
path: result/glove80.uf2