summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: af9ce081a3a9bfb9ea5bb806adcef244aa618686 (plain)
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
46
47
48
49
50
51
52
53
54
name: Build firmware
on:
  push:
    paths-ignore:
      - '**.md'
  pull_request:
    paths-ignore:
      - '**.md'
  workflow_dispatch:


jobs:
  build-firmware:
    runs-on: ubuntu-latest
    container: qmkfm/qmk_cli
    strategy:
      fail-fast: false
      matrix:
        keyboard:
          - ergodox_ez
          - ergodox_ez/shine
          - ergodox_ez/glow
          - moonlander
          - planck/ez
          - planck/ez/glow
        keymap:
          - default
          - oryx

    steps:
    - name: Checkout QMK Firmware
      uses: actions/checkout@v2
      with:
        fetch-depth: 1
        persist-credentials: false
        submodules: true

    - name: Build
      id: build
      run: |
        qmk compile -kb ${{ matrix.keyboard}} -km ${{ matrix.keymap }}

        TARGET="$(echo "${{ matrix.keyboard }}" | sed 's#/#_#g')_${{matrix.keymap}}"
        echo ::set-output name=artifact-name::${TARGET}
        echo "Artifact-name: ${{ steps.build.outputs.artifact-name }}"

    - name: Archive artifacts
      uses: actions/upload-artifact@v2
      with:
        name: "${{ steps.build.outputs.artifact-name }}"
        path: |
          *.hex
          *.bin
      continue-on-error: true