Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: ✍🏻 Create .HA_VERSION file
run: |
mkdir -p ${{ matrix.target.path }}
echo "3000.1.1" > ${{ matrix.target.path }}/.HA_VERSION
echo "2026.10.0" > ${{ matrix.target.path }}/.HA_VERSION

- name: 🏃‍♀️ Run the downloader
run: bash ./get
Expand All @@ -91,6 +91,11 @@ jobs:
- { current: "2022.1.1", target: "2023.1.1", result: 1 }
- { current: "2022.1.1", target: "2023.1.3", result: 1 }
- { current: "2023.12.0", target: "2023.1.3", result: 1 }
- { current: "2026.10.5", target: "2023.1.1", result: 0 }
- { current: "2026.11.0", target: "2023.1.1", result: 1 }
- { current: "2026.11.0b0", target: "2023.1.1", result: 1 }
- { current: "2026.12.0.dev20261101", target: "2023.1.1", result: 1 }
- { current: "2027.1.0", target: "2023.1.1", result: 1 }

steps:
- name: Checkout the repository
Expand Down Expand Up @@ -133,4 +138,42 @@ jobs:
run: |
if [ -f "${{ matrix.target.path }}/custom_components/hacs.zip" ]; then
exit 1
fi
fi

marketplace:
needs: lint
name: Validate Marketplace message for ${{ matrix.version.current }}
runs-on: ubuntu-latest
strategy:
matrix:
version:
- { current: "2026.11.0", url: "https://www.home-assistant.io/integrations/marketplace" }
- { current: "2026.11.0b1", url: "https://rc.home-assistant.io/integrations/marketplace" }
- { current: "2026.12.0.dev20261101", url: "https://next.home-assistant.io/integrations/marketplace" }

steps:
- name: Checkout the repository
uses: actions/checkout@v6.0.3

- name: Create .HA_VERSION file
run: echo "${{ matrix.version.current }}" > .HA_VERSION

- name: Run the script and check result
run: |
set +e
output=$(bash ./get 2>&1)
result=$?
set -e
echo "$output"
if [ "$result" != 1 ]; then
exit 1
fi
if ! echo "$output" | grep -qF "${{ matrix.version.url }}"; then
exit 1
fi

- name: 👀 Verify nothing was downloaded
run: |
if [ -e "./custom_components" ]; then
exit 1
fi
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
17 changes: 16 additions & 1 deletion get
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function run() {
"/usr/share/hassio/homeassistant"
)
declare currentVersion
declare marketplaceDocs
declare currentYear
declare currentMonth
declare currentPatch
Expand Down Expand Up @@ -53,6 +54,21 @@ function run() {

if [ -n "$haPath" ]; then
info "Found Home Assistant configuration directory at '$haPath'"
currentVersion=$(cat "$haPath/.HA_VERSION")
currentYear=$(echo "${currentVersion}" | cut -d "." -f 1)
currentMonth=$(echo "${currentVersion}" | cut -d "." -f 2)

if [ "${currentYear}" -gt 2026 ] || { [ "${currentYear}" -eq 2026 ] && [ "${currentMonth}" -ge 11 ]; }; then
if [[ "${currentVersion}" == *dev* ]]; then
marketplaceDocs="https://next.home-assistant.io/integrations/marketplace"
elif [[ "${currentVersion}" == *b* ]]; then
marketplaceDocs="https://rc.home-assistant.io/integrations/marketplace"
else
marketplaceDocs="https://www.home-assistant.io/integrations/marketplace"
fi
error "HACS does not work on Home Assistant 2026.11 and newer (found ${currentVersion}), as it has been replaced by the native Marketplace integration. See ${marketplaceDocs}"
fi

cd "$haPath" || error "Could not change path to $haPath"
if [ ! -d "$haPath/custom_components" ]; then
info "Creating custom_components directory..."
Expand Down Expand Up @@ -81,7 +97,6 @@ function run() {
echo
info "Verifying versions"
targetVersion=$(sed -n -e '/^MINIMUM_HA_VERSION/p' "$haPath/custom_components/hacs/const.py" | cut -d '"' -f 2)
currentVersion=$(cat "$haPath/.HA_VERSION")

info "Current version is ${currentVersion}, minimum version is ${targetVersion}"

Expand Down
Loading