diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index 7d6fc3d4..f12503e7 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -473,79 +473,78 @@ jobs: cp ${{ steps.build_nspanel_fw.outputs.name }}/${{ steps.build_nspanel_fw.outputs.name }}.factory.bin prebuilt/nspanel_esphome_prebuilt.factory.bin || true cp ${{ steps.build_nspanel_fw.outputs.name }}/manifest.json prebuilt/nspanel_esphome_prebuilt.manifest.json || true - # - name: Build ESPHome Prebuilt Wall Display Firmware - # id: build_wall_display_fw - # uses: esphome/build-action@main - # with: - # yaml-file: prebuilt/wall_display.yaml - # version: beta - - # - name: Update manifest.json - name - # uses: jossef/action-set-json-field@v2.2 - # if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' - # with: - # file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json - # field: name - # value: Wall Display - - # - name: Update manifest.json - version - # uses: jossef/action-set-json-field@v2.2 - # if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' - # with: - # file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json - # field: version - # value: ${{ steps.extract_version.outputs.version }} - - # - name: Update manifest.json - builds.chipFamily - # uses: jossef/action-set-json-field@v2.2 - # if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' - # with: - # file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json - # field: builds.chipFamily - # value: ESP32 - - # - name: Update manifest.json - builds.ota.path - # uses: jossef/action-set-json-field@v2.2 - # if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' - # with: - # file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json - # field: builds.ota.path - # value: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin" - - # - name: Update manifest.json - builds.ota.release_url - # uses: jossef/action-set-json-field@v2.2 - # if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' - # with: - # file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json - # field: builds.ota.release_url - # value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.extract_version.outputs.version }}" - - # - name: Move and Rename Firmware File - wall_display - # if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' - # run: | - # mkdir -p prebuilt - # cp -R ${{ steps.build_wall_display_fw.outputs.name }}/. prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/ - # cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.ota.bin prebuilt/wall_display.bin || true - # cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.factory.bin prebuilt/wall_display.factory.bin || true - # cp ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json prebuilt/wall_display.manifest.json || true + - name: Build ESPHome Prebuilt Wall Display Firmware + id: build_wall_display_fw + uses: esphome/build-action@main + with: + yaml-file: prebuilt/wall_display.yaml + version: beta + + - name: Update manifest.json - name + uses: jossef/action-set-json-field@v2.2 + if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' + with: + file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json + field: name + value: Wall Display + + - name: Update manifest.json - version + uses: jossef/action-set-json-field@v2.2 + if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' + with: + file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json + field: version + value: ${{ steps.extract_version.outputs.version }} + + - name: Update manifest.json - builds.chipFamily + uses: jossef/action-set-json-field@v2.2 + if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' + with: + file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json + field: builds.chipFamily + value: ESP32 + + - name: Update manifest.json - builds.ota.path + uses: jossef/action-set-json-field@v2.2 + if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' + with: + file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json + field: builds.ota.path + value: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/wall_display.bin" + + - name: Update manifest.json - builds.ota.release_url + uses: jossef/action-set-json-field@v2.2 + if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' + with: + file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json + field: builds.ota.release_url + value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.extract_version.outputs.version }}" + + - name: Move and Rename Firmware File - wall_display + if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' + run: | + mkdir -p prebuilt + cp -R ${{ steps.build_wall_display_fw.outputs.name }}/. prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/ + cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.ota.bin prebuilt/wall_display.bin || true + cp ${{ steps.build_wall_display_fw.outputs.name }}/${{ steps.build_wall_display_fw.outputs.name }}.factory.bin prebuilt/wall_display.factory.bin || true + cp ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json prebuilt/wall_display.manifest.json || true - name: Generate checksum for Firmware Files if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' run: | md5sum prebuilt/nspanel_esphome_prebuilt.bin > prebuilt/nspanel_esphome_prebuilt.bin.md5 md5sum prebuilt/nspanel_esphome_prebuilt.factory.bin > prebuilt/nspanel_esphome_prebuilt.factory.bin.md5 - # md5sum prebuilt/wall_display.bin > prebuilt/wall_display.bin.md5 - # md5sum prebuilt/wall_display.factory.bin > prebuilt/wall_display.factory.bin.md5 + md5sum prebuilt/wall_display.bin > prebuilt/wall_display.bin.md5 + md5sum prebuilt/wall_display.factory.bin > prebuilt/wall_display.factory.bin.md5 - name: Commit and Push Firmware Files if: (github.ref == 'refs/heads/dev' || github.base_ref == 'dev') && github.event_name != 'pull_request' run: | git config --global user.name 'GitHub Actions' git config --global user.email 'actions@github.com' - git add prebuilt/*.bin prebuilt/*.md5 prebuilt/*.json prebuilt/${{ steps.build_nspanel_fw.outputs.name }}/*.* + git add prebuilt/*.bin prebuilt/*.md5 prebuilt/*.json prebuilt/${{ steps.build_nspanel_fw.outputs.name }}/*.* prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/*.* git commit -m "Pre-built firmware update: ${{ github.run_id }}" git push - # git add prebuilt/*.bin prebuilt/*.md5 prebuilt/*.json prebuilt/${{ steps.build_nspanel_fw.outputs.name }}/*.* prebuilt/${{ steps.build_wall_display_fw.outputs.name }}/*.* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ... diff --git a/prebuilt/wall_display.yaml b/prebuilt/wall_display.yaml index c8193330..397be63a 100644 --- a/prebuilt/wall_display.yaml +++ b/prebuilt/wall_display.yaml @@ -67,6 +67,12 @@ dashboard_import: package_import_url: github://Blackymas/NSPanel_HA_Blueprint/prebuilt/wall_display.yaml@main import_full_config: false +esp32: + framework: + type: esp-idf + version: 4.4.8 + platform_version: 5.4.0 + esp32_ble: id: ble