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
40 changes: 40 additions & 0 deletions .github/workflows/release-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release zip

# Builds spotcast.zip (the integration files at the zip root) and attaches it
# to the release. HACS downloads this asset because hacs.json sets
# zip_release, and GitHub counts its downloads per release.

on:
release:
types:
- published
workflow_dispatch:
inputs:
tag:
description: "Existing release tag to attach spotcast.zip to (e.g. v6.6.4)"
required: true

permissions:
contents: write

jobs:
zip:
name: Build and upload spotcast.zip
runs-on: ubuntu-latest
env:
TAG: ${{ github.event.release.tag_name || inputs.tag }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
ref: ${{ env.TAG }}

- name: Build spotcast.zip from the tagged tree
run: git archive --format=zip --output=spotcast.zip "HEAD:custom_components/spotcast"

- name: Check the archive layout
run: unzip -l spotcast.zip | grep -q " manifest.json$"

- name: Upload to the release
run: gh release upload "$TAG" spotcast.zip --clobber --repo "$GITHUB_REPOSITORY"
4 changes: 3 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "Spotcast (maintained)",
"homeassistant": "2026.4.0"
"homeassistant": "2026.4.0",
"zip_release": true,
"filename": "spotcast.zip"
}
Loading