From 852d945c8dab7dbd0cb5203b7e8eba5f5396232a Mon Sep 17 00:00:00 2001 From: Black Roland Date: Sat, 2 Nov 2024 19:26:04 +0300 Subject: [PATCH] Set up release workflow --- .github/workflows/release.yaml | 36 +++++++++++++++++++ .../yandexgpt_conversation/manifest.json | 2 +- hacs.json | 4 ++- 3 files changed, 40 insertions(+), 2 deletions(-) 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..b3a4a75 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,36 @@ +name: "Release" + +on: + push: + tags: + - "v*.*.*" + +jobs: + release: + name: "Release" + runs-on: "ubuntu-latest" + permissions: + contents: write + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + - name: "Verify the release version" + uses: technote-space/package-version-check-action@v1 + with: + COMMIT_DISABLED: true + PACKAGE_DIR: ${{ github.workspace }}/custom_components/yandexgpt_conversation + PACKAGE_NAME: manifest.json + - name: "Compress" + shell: "bash" + run: | + cd "${{ github.workspace }}/custom_components/yandexgpt_conversation" + zip -r "${{ runner.temp }}/yandexgpt.zip" ./ + - name: "Publish" + uses: softprops/action-gh-release@v2 + with: + draft: true + files: ${{ runner.temp }}/yandexgpt.zip + body: > + [![Количество скачиваний](https://img.shields.io/github/downloads/black-roland/homeassistant-yandexgpt/${{ github.ref_name }}/total?style=flat-square)](https://github.com/black-roland/homeassistant-yandexgpt/releases) + [![На кофе](https://img.shields.io/badge/%D0%BD%D0%B0%20%D0%BA%D0%BE%D1%84%D0%B5-cc3336?style=flat-square&logo=coffeescript)](https://mansmarthome.info/donate/#donationalerts) + generate_release_notes: true diff --git a/custom_components/yandexgpt_conversation/manifest.json b/custom_components/yandexgpt_conversation/manifest.json index c4bf2b5..65a06b5 100644 --- a/custom_components/yandexgpt_conversation/manifest.json +++ b/custom_components/yandexgpt_conversation/manifest.json @@ -1,7 +1,7 @@ { "domain": "yandexgpt_conversation", "name": "YandexGPT", - "version": "1.0.2", + "version": "1.0.3", "after_dependencies": ["assist_pipeline", "intent"], "codeowners": ["@black-roland"], "config_flow": true, diff --git a/hacs.json b/hacs.json index 97a292d..c51a8f5 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,7 @@ { "name": "YandexGPT", "render_readme": true, - "homeassistant": "2024.11.0b0" + "homeassistant": "2024.11.0b0", + "zip_release": true, + "filename": "yandexgpt.zip" }