Skip to content

MicroHydra Build

MicroHydra Build #26

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: MicroHydra Build
on:
workflow_dispatch:
inputs:
releaseTag:
description: "Tag to use when creating release. If blank, don't create release."
required: false
default: ''
type: string
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Build Scripts
run: |
git submodule update --init --recursive esp-idf
git submodule update --init MicroPython
./esp-idf/install.sh
./tools/microhydra_build_all.sh
- uses: actions/upload-artifact@v4
with:
name: finished-build
path: |
MicroHydra/*.zip
MicroHydra/*.bin
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ inputs.releaseTag }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: finished-build
- uses: ncipollo/release-action@v1
with:
artifacts: "*.bin,*.zip"
tag: ${{ inputs.releaseTag }}
commit: main
generateReleaseNotes: true
draft: true
allowUpdates: true
updateOnlyUnreleased: true
replacesArtifacts: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true