Update to normal sending interval #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
branches: [ main, master ] | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
env: | |
BUILD_TYPE: release | |
FW_VERSION: ${GITHUB_REF##*/} | |
REPOSITORY_NAME: ${GITHUB_REPOSITORY##*/} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup GNU Arm Embedded Toolchain | |
uses: carlosperate/[email protected] | |
- name: Setup env | |
run: | | |
echo "REPORSIORY=${{env.REPOSITORY_NAME}}" >> "$GITHUB_ENV" | |
echo "FW_VERSION=${{env.FW_VERSION}}" >> "$GITHUB_ENV" | |
- name: Setup Ninja | |
uses: ashutoshvarma/[email protected] | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/obj/${{env.BUILD_TYPE}} . -G Ninja -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/sdk/toolchain/toolchain.cmake -DTYPE=${{env.BUILD_TYPE}} | |
- name: Build With Ninja | |
run: ninja -C ${{github.workspace}}/obj/${{env.BUILD_TYPE}} | |
- name: Rename Firmware | |
if: ${{ github.event_name == 'release' }} | |
run: mv ${{github.workspace}}/out/release/firmware.bin ${{env.REPOSITORY_NAME}}-${{env.FW_VERSION}}.bin | |
- name: Release | |
if: ${{ github.event_name == 'release' }} | |
uses: softprops/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
files: ${{env.REPORSIORY}}-${{env.FW_VERSION}}.bin |