Skip to content

Commit

Permalink
Test Factory File
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorSchirmer committed Jul 6, 2024
1 parent 6689aec commit 2a92b50
Show file tree
Hide file tree
Showing 2 changed files with 414 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set uppercase DEVICE_NAME
run: |
echo "UPPERCASE_DEVICE_NAME=$(echo $DEVICE_NAME | tr '[:lower:]' '[:upper:]')" >> $GITHUB_ENV
- name: Build Firmware
uses: esphome/[email protected]
id: esphome-build
with:
yaml_file: Integrations/ESPHome/${{ env.DEVICE_NAME }}.yaml
yaml_file: Integrations/ESPHome/${{ env.UPPERCASE_DEVICE_NAME }}_Factory.yaml
version: 'latest'
cache: true

- name: Read version from YAML file
id: read_version
run: |
version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/${{ env.DEVICE_NAME }}.yaml | tr -d '"')
version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/${{ env.UPPERCASE_DEVICE_NAME }}_Factory.yaml | tr -d '"')
echo "project_version=$version" >> $GITHUB_ENV
- name: Move generated files to output
Expand Down
Loading

0 comments on commit 2a92b50

Please sign in to comment.