Skip to content

Commit

Permalink
Fix Upper Conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorSchirmer committed Jul 2, 2024
1 parent b8079a7 commit fab543c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ jobs:
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 }}.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 }}.yaml | tr -d '"')
echo "project_version=$version" >> $GITHUB_ENV
- name: Move generated files to output
Expand Down

0 comments on commit fab543c

Please sign in to comment.