diff --git a/.github/workflows/hassfest.yml b/.github/workflows/hassfest.yml new file mode 100644 index 0000000..bf1b612 --- /dev/null +++ b/.github/workflows/hassfest.yml @@ -0,0 +1,14 @@ +name: Validate with hassfest + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v3" + - uses: home-assistant/actions/hassfest@master \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0b0c163 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish + +on: + release: + types: + - published + +jobs: + release_zip_file: + name: Publish Dimo zip file asset + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + # Pack the Dimo dir as a zip and upload to the release + - name: ZIP Dimo Dir + if: ${{ github.event_name == 'release' }} + run: | + cd ${{ github.workspace }}/custom_components/dimo + zip dimo.zip -r ./ + - name: Upload zip to release + uses: softprops/action-gh-release@v2 + if: ${{ github.event_name == 'release' }} + with: + files: ${{ github.workspace }}/custom_components/dimo/dimo.zip \ No newline at end of file diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..64ec5b3 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,17 @@ +name: Validate + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + validate-hacs: + runs-on: "ubuntu-latest" + steps: + - name: HACS validation + uses: "hacs/action@main" + with: + category: "integration" \ No newline at end of file diff --git a/custom_components/dimo/manifest.json b/custom_components/dimo/manifest.json index 7805574..ba9250e 100644 --- a/custom_components/dimo/manifest.json +++ b/custom_components/dimo/manifest.json @@ -2,12 +2,13 @@ "domain": "dimo", "name": "DIMO", "codeowners": [ - "@ardevd" + "@ardevd", "@msp1974" ], "config_flow": true, "dependencies": [], - "documentation": "https://www.home-assistant.io/integrations/dimo", + "documentation": "https://github.com/ardevd/ha-dimo/blob/main/README.md", "iot_class": "cloud_polling", + "issue_tracker": "https://github.com/ardevd/ha-dimo/issues", "requirements": [ "dimo-python-sdk==0.0.6", "loguru==0.7.2" diff --git a/hacs.json b/hacs.json new file mode 100644 index 0000000..4b940a4 --- /dev/null +++ b/hacs.json @@ -0,0 +1,8 @@ +{ + "name": "DIMO Integration for Home Assistant", + "homeassistant": "2024.11", + "render_readme": true, + "zip_release": true, + "filename": "dimo.zip" +} + \ No newline at end of file