-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add consolidation step in build workflow and update project name in YAML
- Loading branch information
1 parent
351877c
commit 7f7a9bc
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
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