aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: e6178c247365755e6822482650026263419c7ee5 (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
name: Build

on:
  push:
  pull_request:

jobs:
  build:
    runs-on: ubuntu-22.04
    container: ghcr.io/zephyrproject-rtos/ci:v0.26.2
    env:
      CMAKE_PREFIX_PATH: /opt/toolchains
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          path: lumen-sdk

      - name: Initialize
        working-directory: lumen-sdk
        run: |
          west init -l .
          west update -o=--depth=1 -n

      - name: Build firmware
        working-directory: lumen-sdk
        run: |
          west twister -T app -v --inline-logs --integration

      - name: Prepare Release
        if: startsWith(github.ref, 'refs/tags/')
        run: |
          mv lumen-sdk/twister-out/lumen/app.default/zephyr/merged.hex \
            merged_${{ GITHUB_REF_NAME }}_${{ GITHUB_SHA }}.hex
          mv lumen-sdk/twister-out/lumen/app.default/zephyr/app_update.bin \
            app_update_${{ GITHUB_REF_NAME }}_${{ GITHUB_SHA }}.bin
          ls -al > test.txt

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