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.
chore/assets
schizza 2025-10-26 21:49:22 +01:00
parent 59116a6c48
commit a2bc74c2ad
No known key found for this signature in database
1 changed files with 21 additions and 0 deletions

21
.github/workflows/publish-assets.yml vendored Normal file
View File

@ -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