Skip to content

Commit

Permalink
Merge pull request #19 from dala318/actions
Browse files Browse the repository at this point in the history
Add hacs and release workflows
  • Loading branch information
dala318 authored Jan 10, 2025
2 parents c712062 + c87391a commit c343d9f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/hacs.yaml
Original file line number Diff line number Diff line change
@@ -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"
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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/ev_load_balancing/manifest.json"
- name: "ZIP the integration directory"
shell: "bash"
run: |
cd "${{ github.workspace }}/custom_components/ev_load_balancing"
zip ev_load_balancing.zip -r ./
- name: "Upload the ZIP file to the release"
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/custom_components/ev_load_balancing/ev_load_balancing.zip
4 changes: 3 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"name": "ev_load_balancing",
"render_readme": true
"render_readme": true,
"zip_release": true,
"filename": "ev_load_balancing.zip"
}

0 comments on commit c343d9f

Please sign in to comment.