Skip to content

Attach memory.zip on release for download tracking#1

Merged
jayzuccarelli merged 1 commit into
mainfrom
add-zip-release
Jun 24, 2026
Merged

Attach memory.zip on release for download tracking#1
jayzuccarelli merged 1 commit into
mainfrom
add-zip-release

Conversation

@jayzuccarelli

@jayzuccarelli jayzuccarelli commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Makes HACS install counts trackable via GitHub release download_count.

Why: HACS installs by pulling the source zipball, which GitHub does not count — so download_count stays 0 forever. Setting zip_release: true + filename: memory.zip makes HACS download an attached asset instead, and GitHub counts every asset download.

Changes:

  • hacs.json: add zip_release + filename
  • .github/workflows/release.yml: build memory.zip (contents of custom_components/memory/) and attach it on every published release

After merge, the next published release activates tracking. Query with gh api repos/jayzuccarelli/ha-memory/releases --jq '.[].assets[]|{name,download_count}'.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added automated release packaging for the integration when a release is published.
    • Release builds now include a downloadable ZIP asset named memory.zip.
  • Chores
    • Updated release configuration so the packaged file is attached to published releases and recognized by distribution tooling.

HACS installs via source zipball, which GitHub does not count. Set
zip_release + filename so HACS pulls an attached asset instead, and add
a release workflow that builds and attaches memory.zip on publish. This
makes release download_count a real per-version install counter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e3fbb31f-5830-45ad-b196-bd02afd9a822

📥 Commits

Reviewing files that changed from the base of the PR and between 424105f and 10dfbec.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • hacs.json

📝 Walkthrough

Walkthrough

Adds a release workflow that builds custom_components/memory into memory.zip on published releases and uploads it to the GitHub release. Updates hacs.json to declare zip-release packaging and the artifact filename.

Changes

Release packaging

Layer / File(s) Summary
Release workflow and HACS metadata
.github/workflows/release.yml, hacs.json
Adds HACS zip-release settings and a release workflow that creates memory.zip from custom_components/memory and attaches it to the published release.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A bunny packed a zip so neat,
With whiskers twitching, quick and sweet.
The release bell rang, the bundle flew,
memory.zip hopped right on through.
🐇✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-zip-release

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jayzuccarelli jayzuccarelli merged commit 126518b into main Jun 24, 2026
4 of 7 checks passed
@jayzuccarelli jayzuccarelli deleted the add-zip-release branch June 24, 2026 19:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10dfbec607

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hacs.json
"render_readme": true,
"homeassistant": "2024.10.0"
"homeassistant": "2024.10.0",
"zip_release": true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Hide branch installs for zip releases

With zip_release enabled, HACS installs via the configured release asset rather than the repository archive. In the default-branch install path (for HACS versions/UIs that offer it, or when users pass main via the update service), the selected ref is the branch name, so HACS looks for /releases/download/main/memory.zip; this workflow only creates memory.zip for published tag releases. Add hide_default_branch: true or provide a branch-compatible path, otherwise those installs/redownloads fail with a 404.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant