diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..02724a6 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,22 @@ +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get version + id: version + uses: home-assistant/actions/helpers/version@master + - name: Patch manifest and zip + run: | + sed -i 's/v0.0.0/${{ steps.version.outputs.version }}/' custom_components/victron/manifest.json + + cd custom_components/victron/ + zip ../../victron.zip ./* -x '.*' + - uses: JasonEtco/upload-to-release@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: ./victron.zip application/zip \ No newline at end of file diff --git a/.github/workflows/issue-label-bot.yaml b/.github/workflows/issue-label-bot.yaml new file mode 100644 index 0000000..0ac8bab --- /dev/null +++ b/.github/workflows/issue-label-bot.yaml @@ -0,0 +1,4 @@ +label-alias: + bug: 'bug' + feature_request: 'feature_request' + question: 'question' \ No newline at end of file diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 0000000..5ed0171 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,18 @@ +name: "Close stale issues/pull requests" +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days' + stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days' + days-before-stale: 30 + days-before-close: 7 + operations-per-run: 500 + exempt-issue-labels: 'on-hold' \ No newline at end of file diff --git a/hacs.json b/hacs.json index 11fdbdf..65d07db 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,9 @@ { "name": "Victron GX modbus TCP", "render_readme": true, + "zip_release": true, + "filename": "victron.zip", + "hide_default_branch": false, "homeassistant": "2025.1", "hacs": "1.28.4" } \ No newline at end of file