Skip to content

Commit

Permalink
Updated: Github-Action, Release binaries workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SquadQuiz committed Apr 23, 2024
1 parent 45b1113 commit 21260b7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/release_workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
name: CMake Build STM32 Project (gcc-arm-none-eabi)
name: Publish firmware binaries to release

# Because a PR results in a push; this workflow will run when a PR is merged
# or when a commit is pushed directly to any branch.
on:
push:
tags:
- '*'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
build-and-prepare-binaries:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- 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 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
- name: Build firmware binaries
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Test
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}

Expand All @@ -38,4 +39,4 @@ jobs:
file: ${{github.workspace}}/build/*.{elf,hex,bin}
tag: ${{ github.ref }}
overwrite: true
file_glob: true
file_glob: true

0 comments on commit 21260b7

Please sign in to comment.