Skip to content

fix: Re-scope bold around miele:// to render correctly in HA UI #7

fix: Re-scope bold around miele:// to render correctly in HA UI

fix: Re-scope bold around miele:// to render correctly in HA UI #7

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
tag:
description: "Tag to release (e.g. v1.0.0)"
required: true
permissions:
contents: write
jobs:
release:
name: Publish GitHub Release
runs-on: ubuntu-latest
steps:
- name: Resolve ref
id: ref
env:
INPUT_TAG: ${{ inputs.tag }}
EVENT_NAME: ${{ github.event_name }}
run: |
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
echo "ref=$INPUT_TAG" >> "$GITHUB_OUTPUT"
echo "tag=$INPUT_TAG" >> "$GITHUB_OUTPUT"
else
echo "ref=$GITHUB_REF" >> "$GITHUB_OUTPUT"
echo "tag=$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@v4
with:
ref: ${{ steps.ref.outputs.ref }}
- name: Verify manifest version matches tag
env:
TAG: ${{ steps.ref.outputs.tag }}
run: |
TAG_VERSION="${TAG#v}"
MANIFEST_VERSION=$(jq -r '.version' custom_components/miele_lan/manifest.json)
if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then
echo "::error::Tag $TAG (=> $TAG_VERSION) does not match manifest.json version $MANIFEST_VERSION"
exit 1
fi
echo "OK: tag $TAG matches manifest version $MANIFEST_VERSION"
- name: Detect prerelease
id: meta
env:
TAG: ${{ steps.ref.outputs.tag }}
run: |
if printf '%s' "$TAG" | grep -q -- '-'; then
echo "prerelease=true" >> "$GITHUB_OUTPUT"
else
echo "prerelease=false" >> "$GITHUB_OUTPUT"
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.ref.outputs.tag }}
name: ${{ steps.ref.outputs.tag }}
generate_release_notes: true
draft: false
prerelease: ${{ steps.meta.outputs.prerelease }}