From 288b6b835c8fbaa4dd4642bc1e7c42609e4aec3e Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Thu, 4 Jul 2024 19:12:38 +0200 Subject: [PATCH] Use project.version for combine manifest build (#524) --- .github/workflows/build-firmware.yaml | 1 + .github/workflows/deploy-firmware.yaml | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-firmware.yaml b/.github/workflows/build-firmware.yaml index 6fa23126..df271f06 100644 --- a/.github/workflows/build-firmware.yaml +++ b/.github/workflows/build-firmware.yaml @@ -112,6 +112,7 @@ jobs: mkdir -p output/${{ matrix.device }} mv ${{ steps.esphome-build.outputs.name }}/* output/${{ matrix.device }}/ echo ${{ steps.esphome-build.outputs.version }} > output/${{ matrix.device }}/version + echo ${{ steps.esphome-build.outputs.project-version }} > output/${{ matrix.device }}/project_version - name: ๐Ÿ”จ Alter path in manifest.json run: | sed -i 's/${{ steps.esphome-build.outputs.name }}\//\/${{ matrix.firmware }}\/${{ matrix.device }}\//g' output/${{ matrix.device }}/manifest.json diff --git a/.github/workflows/deploy-firmware.yaml b/.github/workflows/deploy-firmware.yaml index 20ae3c7f..e859325c 100644 --- a/.github/workflows/deploy-firmware.yaml +++ b/.github/workflows/deploy-firmware.yaml @@ -8,11 +8,6 @@ on: - published workflow_dispatch: inputs: - release-tag: - description: "Release tag" - default: "x.x.x" - required: true - type: string release-url: description: "Release URL" default: "https://github.com" @@ -45,7 +40,7 @@ jobs: path: files - name: ๐Ÿ”จ Generate device manifest.json run: | - version=${{ github.event.release.tag_name || inputs.release-tag }} + version=cat(project_version) 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