diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b863ce58 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: + release: + types: + - published + +permissions: + contents: write + +jobs: + release-zip: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Prepare release + run: | + cd ${{ github.workspace }}/custom_components/yandex_smart_home + zip -r yandex_smart_home.zip ./ + + - name: Upload zip + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/custom_components/yandex_smart_home/yandex_smart_home.zip + asset_name: yandex_smart_home.zip + tag: ${{ github.ref }} + overwrite: true diff --git a/hacs.json b/hacs.json index 24a53d20..d984bbe5 100644 --- a/hacs.json +++ b/hacs.json @@ -2,5 +2,7 @@ "country": ["RU", "BY"], "homeassistant": "2022.5", "name": "Yandex Smart Home", - "render_readme": true + "render_readme": true, + "zip_release": true, + "filename": "yandex_smart_home.zip" }