Skip to content

Commit

Permalink
add release version check with manifest.json verion
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwentao committed Jun 3, 2024
1 parent 95bb215 commit 9555447
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ jobs:
with:
fetch-depth: 0
clean: true
- name: check manifest.json version
id: check_version
run: |
# Extract the version from manifest.json
manifest_version=$(grep -oP '(?<="version": ")[^"]*' custom_components/midea_ac_lan/manifest.json)
echo "Manifest.json version: $manifest_version"
# Extract the release tag
release_tag="${GITHUB_REF#refs/tags/}"
echo "Release tag: $release_tag"
# Check if the versions match
if [ "$release_tag" != "$manifest_version" ]; then
echo "Error: Release tag ($release_tag) does not match manifest.json version ($manifest_version)"
exit 1
fi
- name: Zip release file
run: |
sudo apt-get update || exit 1
Expand Down

0 comments on commit 9555447

Please sign in to comment.