Skip to content

Snapshot

Snapshot #39

Workflow file for this run

name: Snapshot
on:
push:
tags:
- 'snapshot/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Cache ARM tools
uses: actions/cache@v3
env:
cache-name: cache-arm-tools
with:
path: downloads/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
key: gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux
- name: Install ARM tools
run: make arm_sdk_install
- name: Set build variables
run: |
GIT_VER=${GITHUB_REF##*/}
GIT_TAG=${GITHUB_REF##refs/tags/}
if [[ ${GIT_VER} =~ ^[0-9]+[.][0-9]+[.][0-9]+[-][A-Za-z0-9]+ ]]
then
GIT_PRE="${GIT_VER##*-}"
else
GIT_PRE="${GIT_VER}"
fi
echo "GIT_VER=${GIT_VER}" >> ${GITHUB_ENV}
echo "GIT_TAG=${GIT_TAG}" >> ${GITHUB_ENV}
echo "GIT_PRE=${GIT_PRE}" >> ${GITHUB_ENV}
cat ${GITHUB_ENV}
- name: Build HEX files for unified targets
run: make unified unified_osd FC_VER_SUFFIX="${{ env.GIT_PRE }}" FLASH_CONFIG_ERASE=yes
- name: Create Snapshot
run: |
gh release create ${{ env.GIT_TAG }} --prerelease --notes-file "Snapshot.md" --title "Rotorflight Snapshot ${{ env.GIT_VER }}" obj/*.hex
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}