From 94e8ba62620082954524e7572d7adef3bd365fde Mon Sep 17 00:00:00 2001 From: chliny Date: Mon, 12 May 2025 09:52:58 +0800 Subject: [PATCH] chore: update workflow --- .github/workflows/release.yaml | 25 +++++++++++++++++++++++++ hacs.json | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..e5eb2a2 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +name: Release + +on: + release: + types: [published] + +jobs: + release-zip: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: ZIP Component Dir + run: | + cd ${{ github.workspace }}/custom_components/tencentcloud_asr + zip -r tencentcloud_asr.zip ./ + + - name: Upload zip to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/custom_components/tencentcloud_asr/tencentcloud_asr.zip + asset_name: tencentcloud_asr.zip + tag: ${{ github.ref }} + overwrite: true diff --git a/hacs.json b/hacs.json index 1d9e4a3..d693487 100644 --- a/hacs.json +++ b/hacs.json @@ -3,5 +3,7 @@ "domains": [ "tencentcloud_asr" ], - "render_readme": true + "render_readme": true, + "zip_release": true, + "filename": "tencentcloud_asr.zip" }