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
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
container: | |
image: archlinux:latest | |
steps: | |
- name: base-devel | |
run: pacman -Syyu base-devel --noconfirm | |
- name: arm-none-eabi-gcc | |
run: pacman -Syyu arm-none-eabi-gcc --noconfirm | |
- name: arm-none-eabi-newlib | |
run: pacman -Syyu arm-none-eabi-newlib --noconfirm | |
- name: git | |
run: pacman -Syyu git --noconfirm | |
- name: python-pip | |
run: pacman -Syyu python-pip --noconfirm | |
- name: python-crcmod | |
run: pacman -Syyu python-crcmod --noconfirm | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: safe.directory | |
run: git config --global --add safe.directory /__w/uv-k5-firmware-custom/uv-k5-firmware-custom | |
- name: Make | |
run: AUTHOR_STRING=${{ github.actor }} make -j | |
- name: size | |
run: arm-none-eabi-size firmware | |
- name: Size Packet | |
run: ls -la firmware.packed.bin firmware firmware.bin | |
- name: Add SHORT_SHA env property with commit short sha | |
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: firmware_${{ env.SHORT_SHA }} | |
path: firmware*.bin | |
- name: Upload binaries to release | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: firmware.packed.bin | |
asset_name: egzumer_$tag.packed.bin | |
tag: ${{ github.ref }} | |
overwrite: true | |
release_name: release ${{ github.ref_name }} | |