From a2bc74c2ad679c5e02039b37fbf714450bb3f25d Mon Sep 17 00:00:00 2001 From: schizza Date: Sun, 26 Oct 2025 21:49:22 +0100 Subject: [PATCH 1/2] Adds workflow to publish ZIP asset on release Creates a GitHub Actions workflow that automatically builds a ZIP archive of the custom component and attaches it to new releases. This simplifies distribution and installation for users. --- .github/workflows/publish-assets.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/publish-assets.yml diff --git a/.github/workflows/publish-assets.yml b/.github/workflows/publish-assets.yml new file mode 100644 index 0000000..84483f9 --- /dev/null +++ b/.github/workflows/publish-assets.yml @@ -0,0 +1,21 @@ +name: Build & Attach ZIP asset +on: + release: + types: [published] + +jobs: + build-zip: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Create ZIP + run: | + mkdir -p dist + cd custom_components/sws12500 + zip -r ../../dist/weather-station.zip . -x "*/__pycache__/*" + + - name: Upload ZIP to release + uses: softprops/action-gh-release@v2 + with: + files: dist/weather-station.zip From b3032d072fddd87812fc3bfca022035e7c318bfd Mon Sep 17 00:00:00 2001 From: schizza Date: Sun, 26 Oct 2025 21:53:58 +0100 Subject: [PATCH 2/2] Adds assets for HACS integration Adds download badges to the README for better visibility and includes zip release and filename options in the HACS manifest to enable direct downloads through HACS. --- README.md | 3 +++ hacs.json | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index db84f8b..2a82bc9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +![GitHub Downloads](https://img.shields.io/github/downloads/schizza/SWS-12500-custom-component/total?label=downloads%20%28all%20releases%29) +![Latest release downloads](https://img.shields.io/github/downloads/schizza/SWS-12500-custom-component/latest/total?label=downloads%20%28latest%29) + # Integrates your Sencor SWS 12500 or 16600, GARNI, BRESSER weather stations seamlessly into Home Assistant This integration will listen for data from your station and passes them to respective sensors. It also provides the ability to push data to Windy API. diff --git a/hacs.json b/hacs.json index e04be42..ece4c97 100644 --- a/hacs.json +++ b/hacs.json @@ -1,4 +1,6 @@ { "name": "Sencor SWS 12500 Weather station", - "render_readme": true + "filename": "weather-station.zip", + "render_readme": true, + "zip_release": true }