Skip to content

Commit

Permalink
Merge pull request #12 from ApolloAutomation/Version7
Browse files Browse the repository at this point in the history
Version
  • Loading branch information
TrevorSchirmer authored Nov 8, 2024
2 parents adcfe71 + 8946b77 commit b914375
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
31 changes: 10 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,11 @@ jobs:
echo "::set-output name=yaml_changed::false"
fi
read-version:
name: Read Version from YAML
runs-on: ubuntu-latest
needs: check-for-yaml
if: always()
outputs:
project_version: ${{ steps.read_version.outputs.project_version }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Read version from YAML file
id: read_version
run: |
version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/Core.yaml | tr -d '"')
echo "project_version=$version" >> $GITHUB_ENV
shell: bash

build-firmware:
name: Build And Release
uses: esphome/workflows/.github/workflows/build.yml@main
needs:
- check-for-yaml
- read-version
if: needs.check-for-yaml.outputs.yaml_changed == 'true'
with:
files: |
Expand All @@ -78,7 +59,6 @@ jobs:
uses: esphome/workflows/.github/workflows/build.yml@main
needs:
- check-for-yaml
- read-version
if: needs.check-for-yaml.outputs.yaml_changed == 'true'
with:
files: |
Expand All @@ -94,7 +74,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- check-for-yaml
- read-version
- build-firmware
- build-firmware-b
if: needs.check-for-yaml.outputs.yaml_changed == 'true'
Expand Down Expand Up @@ -148,6 +127,16 @@ jobs:
PR_BODY=$(echo "$PR_INFO" | jq -r '.[0].body')
echo "::set-output name=body::$PR_BODY"
- name: Checkout code
uses: actions/checkout@v3

- name: Read version from YAML file
id: read_version
run: |
version=$(awk '/substitutions:/ {found=1} found && /version:/ {print $2; exit}' Integrations/ESPHome/Core.yaml | tr -d '"')
echo "project_version=$version" >> $GITHUB_ENV
shell: bash

# Create GitHub Release using the last PR's body
- name: Create Release
id: create_release
Expand Down
2 changes: 1 addition & 1 deletion Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
substitutions:
version: "24.11.7.6"
version: "24.11.7.7"

esp32:
board: esp32-c3-devkitm-1
Expand Down

0 comments on commit b914375

Please sign in to comment.