generated from moergo-sc/glove80-zmk-config
-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (40 loc) · 1.21 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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: cachix/install-nix-action@v25
- 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