Configurator update #61
Workflow file for this run
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: Release OpenFFBoard firmware | |
# Controls when the workflow will run | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
# Branch filtering is not possible when triggerd by tags! | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
Build_firmware: | |
uses: ./.github/workflows/build-firmware.yml | |
Build_configurator: | |
name: Build configurator | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.conf.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
conf: [ {os: 'windows-latest', pyver: '3.8'},{os: 'windows-latest', pyver: '3.11'}, {os: 'macos-latest', pyver: '3.10'}] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Build configurator | |
id: build_c | |
uses: ./Configurator/.github/actions/build-pyinstaller | |
with: | |
path: '${{ github.workspace }}/Configurator' | |
python-version: '${{ matrix.conf.pyver }}' | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: OpenFFBoard-Configurator-${{ matrix.conf.os }}-py${{ matrix.conf.pyver }} | |
path: ${{ steps.build_c.outputs.distpath }} | |
Release: | |
needs: [Build_firmware,Build_configurator] # Requires build first | |
name: Create release | |
runs-on: ubuntu-latest | |
#if: github.event.base_ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
# Download artifacts for release | |
- uses: actions/download-artifact@v3 | |
with: | |
path: etc/usr/artifacts/ | |
- name: Copy firmware readme | |
run: cp -u ${{ github.workspace }}/Firmware/Targets/README_FIRMWARE.md etc/usr/artifacts/README.md | |
# # Move hex files | |
# - name: Move firmware files | |
# run: find etc/usr/artifacts/ -name '*.hex' -exec cp {} etc/usr/fw/ \; | |
- name: Zip firmware | |
run: zip -qq -r Firmware.zip OpenFFBoard-Firmware-* README.md | |
working-directory: etc/usr/artifacts/ | |
- name: Zip configurator | |
run: | | |
for i in OpenFFBoard-Configurator-*/; do zip -qq -r "${i%/}.zip" "$i"; done | |
working-directory: etc/usr/artifacts/ | |
- name: Make changelog | |
run: | | |
echo -e "### Firmware changes\n" > /tmp/CHANGELOG.md | |
cat ${{ github.workspace }}/CHANGELOG.md >> /tmp/CHANGELOG.md | |
echo -e "\n### Configurator changes\n" >> /tmp/CHANGELOG.md | |
cat ${{ github.workspace }}/Configurator/CHANGELOG.md >> /tmp/CHANGELOG.md | |
# Create release | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: "OpenFFBoard ${{github.ref_name}}" | |
body_path: /tmp/CHANGELOG.md | |
files: etc/usr/artifacts/*.zip | |
prerelease: ${{contains(github.ref_name, '-')}} |