From 1c655be8def31a5965b487d034fbdc4fc0448333 Mon Sep 17 00:00:00 2001 From: topsworld Date: Fri, 13 Dec 2024 09:35:31 +0800 Subject: [PATCH] feat: create release.yaml --- .github/workflows/release.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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..2d0585f --- /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@v4 + + - name: ZIP Component Dir + run: | + cd ${{ github.workspace }}/custom_components/xiaomi_home + zip -r xiaomi_home.zip ./ + + - name: Upload zip to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/custom_components/xiaomi_home/xiaomi_home.zip + asset_name: xiaomi_home.zip + tag: ${{ github.ref }} + overwrite: true