-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 1.11 KB
/
release_workflow.yaml
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
name: Publish firmware binaries to release
on:
push:
tags:
- '*'
env:
BUILD_TYPE: Release
jobs:
build-and-prepare-binaries:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install GCC ARM toolchain
run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi
- name: Install Ninja Build Generator
run: sudo apt-get install -y ninja-build
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build firmware binaries
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{github.workspace}}/build
asset_name: firmware.{elf,hex,bin}
tag: ${{ github.ref }}
overwrite: true