Skip to content

Commit

Permalink
Add consolidation step in build workflow and update project name in YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasnicolaas committed Oct 28, 2024
1 parent 351877c commit 7f7a9bc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,43 @@ jobs:
mv ${{ steps.esphome-build.outputs.name }}/* output/${{ matrix.file }}
echo ${{ steps.esphome-build.outputs.version }} > output/${{ matrix.file }}/version
echo ${{ steps.esphome-build.outputs.project-version }} > output/${{ matrix.file }}/project-version
- name: Display the generated files
run: ls -R output
- name: ⬆️ Upload firmware / device artifact
uses: actions/[email protected]
with:
name: ${{ matrix.file }}
name: build-${{ steps.esphome-build.outputs.name }}
path: output
retention-days: 1

consolidate:
name: Consolidate manifests
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
include:
- project: onju-voice
name: Onju Voice
- project: onju-voice-microwakeword
name: Onju Voice Microwakeword
steps:
- name: ⤵️ Download artifacts
uses: actions/[email protected]
with:
name: build-*
merge-multiple: true
path: files
- name: 🔨 Generate combined manifest.json
run: |
version=$(cat files/*/project_version | sort -V | tail -n 1)
jq -s --arg version "$version" '{"name": "${{ matrix.name }}", "version": $version, "home_assistant_domain": "esphome", "builds":.}' files/*/manifest.json > files/manifest.json
- name: 🧪 Display structure of job
run: ls -R
- name: ⬆️ Upload project artifact
uses: actions/[email protected]
with:
name: ${{ matrix.project }}
path: files
retention-days: 1
2 changes: 1 addition & 1 deletion esphome/onju-voice-microwakeword.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
substitutions:
name: "onju-voice"
name: "onju-voice-microwakeword"
friendly_name: "Onju Voice Satellite"
project_version: "1.1.0"
device_description: "Onju Voice Satellite with ESPHome software and microWakeWord"
Expand Down

0 comments on commit 7f7a9bc

Please sign in to comment.