Skip to content

Commit

Permalink
Add release info to build process
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenpapierski committed Aug 14, 2024
1 parent dce4177 commit 8a2783e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/action-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,31 @@ on:
required: false
type: string
default: ESPHome
manifest_filename:
manifest-filename:
description: Filename of the manifest to write.
required: false
type: string
default: manifest.json
esphome_version:
esphome-version:
description: Version of ESPHome to build for.
required: false
type: string
default: latest
build_fw:
build-fw:
description: Build the firmware
required: false
type: boolean
default: true
release-summary:
description: A summary of the release that will be added to the manifest file.
required: false
type: string
default: ""
release-url:
description: A URL to the release page that will be added to the manifest file.
required: false
type: string
default: ""

jobs:
prepare:
Expand Down Expand Up @@ -55,6 +65,8 @@ jobs:
with:
yaml-file: ${{ matrix.file }}
version: ${{ inputs.esphome_version }}
release-summary: ${{ inputs.release-summary }}
release-url: ${{ inputs.release-url }}
- run: |
mkdir output
mv "${{ steps.esphome-build.outputs.name }}" output/
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/workflow-bpmk1-fw-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,20 @@ on:

jobs:
build:
uses: ./.github/workflows/action-build-and-publish.yml
with:
files: bed-presence-mk1.factory.yaml
name: Bed Presence Mk1
esphome_version: latest
manifest_filename: bpmk1-manifest.json
steps:
- name: Get release info
id: release-info
uses: jbutcher5/[email protected]
with:
file: bed-presence-mk1/release-info.yaml
key-path: '["release-summary", "release-url"]'
- run: echo "${{ steps.release-info.outputs.data }}"
- run: echo "${{ steps.release-info.outputs.data.release-summary }}"
- run: echo "${{ steps.release-info.outputs.data.release-url }}"
- name: Build and Publish
uses: ./.github/workflows/action-build-and-publish.yml
with:
files: bed-presence-mk1.factory.yaml
name: Bed Presence Mk1
esphome-version: latest
manifest-filename: bpmk1-manifest.json
2 changes: 1 addition & 1 deletion .github/workflows/workflow-pages-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
with:
files: bed-presence-mk1.yaml
name: Bed Presence Mk1
build_fw: false
build-fw: false
2 changes: 2 additions & 0 deletions bed-presence-mk1/release-info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"release-summary": "Testing release summary (1)"
"release-url": "https://docs.elevatedsensors.com/webtools"

0 comments on commit 8a2783e

Please sign in to comment.