Files
Adafruit_nRF52_Bootloader_O…/.github/workflows/githubci.yml
T
taco a62825be47
Build / set-matrix (push) Canceled after 0s
Build / build (${{ fromJSON(needs.set-matrix.outputs.matrix) }}) (push) Canceled after 0s
Build / draft-release (push) Canceled after 0s
update github workflow
2026-08-19 23:05:04 +10:00

88 lines
2.1 KiB
YAML

name: Build
on:
push:
tags:
- '*'
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Set matrix
id: set-matrix
working-directory: src/boards
run: |
MATRIX_JSON=$(ls -d */ | sed 's/\/$//' | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=$MATRIX_JSON"
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
build:
needs: set-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: ${{ fromJSON(needs.set-matrix.outputs.matrix) }}
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '12.3.Rel1'
- name: Install Tools
run: |
pip3 install adafruit-nrfutil uritemplate requests intelhex setuptools
- name: Build
run: |
make BOARD=${{ matrix.board }} all
make BOARD=${{ matrix.board }} copy-artifact
- uses: actions/upload-artifact@v6
with:
name: ${{ matrix.board }}
path: _bin/${{ matrix.board }}
if-no-files-found: error
draft-release:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Collect all board artifacts
uses: actions/download-artifact@v6
with:
path: _bin
merge-multiple: true
- name: List collected files
run: ls -lR _bin
- name: Create draft release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
draft: true
generate_release_notes: true
fail_on_unmatched_files: true
files: |
_bin/*_bootloader-*.zip
_bin/*_bootloader-*.hex
_bin/update-*_bootloader-*.uf2