V1.4 (#7) #1
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: ci | |
on: | |
push: | |
# Publish pep440 tags as releases. | |
branches: [ "master" ] | |
# Ignore the push event when creating tags | |
tags-ignore: | |
- 'v?[0-9]+.[0-9]+.[0-9]+' | |
release: | |
types: | |
- published | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install GNU Arm Embedded Toolchain | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
with: | |
release: latest | |
- name: Build firmware | |
run: | | |
make | |
- name: Upload binary files as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Scan2000STM32_FW | |
path: build/Scan2000STM32.bin | |
retention-days: 7 | |
release: | |
name: 'Append binary firmware files to release' | |
needs: | |
- build | |
if: github.event.action == 'published' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download binary files artifact | |
uses: actions/download-artifact@v4 | |
with: | |
path: build | |
pattern: Scan2000STM32_FW | |
merge-multiple: true | |
- name: Append firmware image as asset | |
run: | | |
gh release upload ${{ github.ref_name }} build/Scan2000STM32.bin#"SCAN2000_STM32 firmware image (bin)" --repo ${{ github.repository }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash |