From de5fbdcfdf50bb8ab4b6d1c10642d85830ba3e3f Mon Sep 17 00:00:00 2001 From: rany Date: Thu, 6 Jun 2024 09:27:13 +0300 Subject: [PATCH] Switch to using GitHub releases Signed-off-by: rany --- .github/workflows/release.yml | 27 +++++++++++++++++++ .github/workflows/validate.yml | 17 ++++++++++++ .../open_meteo_solar_forecast/manifest.json | 2 +- hacs.json | 5 +++- info.md | 4 +++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..260c129 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + release: + types: [published] + +jobs: + release_zip_file: + name: Prepare release asset + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v2 + + # Pack the open_meteo_solar_forecast dir as a zip and upload to the release + - name: ZIP open_meteo_solar_forecast Dir + run: | + cd ${{ github.workspace }}/custom_components/open_meteo_solar_forecast + zip open_meteo_solar_forecast.zip -r ./ + - name: Upload zip to release + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/custom_components/open_meteo_solar_forecast/open_meteo_solar_forecast.zip + asset_name: open_meteo_solar_forecast.zip + tag: ${{ github.ref }} + overwrite: true diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..fc1b5f9 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,17 @@ +name: Validate + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v2" + - name: HACS validation + uses: "hacs/action@main" + with: + category: "integration" diff --git a/custom_components/open_meteo_solar_forecast/manifest.json b/custom_components/open_meteo_solar_forecast/manifest.json index 7d979c5..be6a758 100644 --- a/custom_components/open_meteo_solar_forecast/manifest.json +++ b/custom_components/open_meteo_solar_forecast/manifest.json @@ -7,5 +7,5 @@ "integration_type": "service", "iot_class": "cloud_polling", "requirements": ["open_meteo_solar_forecast==0.1.13"], - "version": "0.1.8" + "version": "0.1.9" } diff --git a/hacs.json b/hacs.json index 194c468..661f500 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,8 @@ { "name": "Open-Meteo Solar Forecast", "render_readme": false, - "homeassistant": "2022.11" + "homeassistant": "2022.11", + "iot_class": "Cloud Polling", + "zip_release": true, + "filename": "open_meteo_solar_forecast.zip" } diff --git a/info.md b/info.md index d878a25..acef741 100644 --- a/info.md +++ b/info.md @@ -1,5 +1,9 @@ ### Changes +v0.1.9 + +- Switched to using GitHub releases. + v0.1.8 - Fix ` TypeError: unsupported operand type(s) for *: ‘NoneType’ and ‘int’` bug.