diff --git a/.github/workflows/hacs.yaml b/.github/workflows/hacs.yaml new file mode 100644 index 0000000..2f8ba2f --- /dev/null +++ b/.github/workflows/hacs.yaml @@ -0,0 +1,15 @@ +name: HACS Action + +on: + push: + pull_request: + +jobs: + hacs: + name: HACS Action + runs-on: "ubuntu-latest" + steps: + - name: HACS Action + uses: "hacs/action@main" + with: + category: "integration" \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..5634b49 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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" + + - name: "Adjust version number" + shell: "bash" + run: | + yq -i -o json '.version="${{ github.event.release.tag_name }}"' \ + "${{ github.workspace }}/custom_components/nordpool_planner/manifest.json" + + # - name: "ZIP the integration directory" + # shell: "bash" + # run: | + # cd "${{ github.workspace }}/custom_components/nordpool_planner" + # zip nordpool_planner.zip -r ./ + + # - name: "Upload the ZIP file to the release" + # uses: softprops/action-gh-release@v2.0.8 + # with: + # files: ${{ github.workspace }}/custom_components/nordpool_planner/nordpool_planner.zip \ No newline at end of file diff --git a/hacs.json b/hacs.json index d3a04bf..916e159 100644 --- a/hacs.json +++ b/hacs.json @@ -1,4 +1,5 @@ { "name": "nordpool_planner", - "render_readme": true + "render_readme": true, + "zip_release": true }