diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4294a33 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,14 @@ +name: Build +on: + pull_request: + push: +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install + run: npm ci + - name: Build + run: npm run build \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..73167cb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release +on: + push: + tags: + - "v*.*.*" +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install + run: npm ci + - name: Build + run: npm run build + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + draft: true + generate_release_notes: true + files: dist/*.js \ No newline at end of file diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..3a0036b --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,15 @@ +name: HACS validation +on: + push: + branches: + - main +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: HACS validation + uses: "hacs/action@main" + with: + category: "plugin" \ No newline at end of file diff --git a/hacs.json b/hacs.json new file mode 100644 index 0000000..6523adf --- /dev/null +++ b/hacs.json @@ -0,0 +1,6 @@ +{ + "name": "Energy Sankey Card", + "render_readme": true, + "filename": "energy-sankey.js", + "content_in_root": false +} \ No newline at end of file