From d4f63ce015fe967d24edd45c123596589c1430f2 Mon Sep 17 00:00:00 2001 From: Basti <89860334+Xerolux@users.noreply.github.com> Date: Wed, 25 Sep 2024 03:50:45 +0200 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c312a70 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: "Release" + +on: + release: + types: + - "published" + +permissions: {} + +jobs: + release: + name: "Release" + runs-on: "ubuntu-latest" + permissions: + contents: write + steps: + - name: "Checkout the repository" + uses: "actions/checkout@v4.1.5" + + - name: "Adjust version number" + shell: "bash" + run: | + yq -i -o json '.version="${{ github.event.release.tag_name }}"' \ + "${{ github.workspace }}/custom_components/violet_pool_controller/manifest.json" + + - name: "ZIP the integration directory" + shell: "bash" + run: | + cd "${{ github.workspace }}/custom_components/violet_pool_controller" + zip proconip_pool_controller.zip -r ./ + + - name: "Upload the ZIP file to the release" + uses: softprops/action-gh-release@v2 + with: + files: ${{ github.workspace }}/custom_components/violet_pool_controller/violet_pool_controller.zip