Skip to content

Commit a8ef560

Browse files
committed
Add release workflow and hacs.json
1 parent e185f17 commit a8ef560

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Release"
2+
3+
on:
4+
release:
5+
types:
6+
- "published"
7+
8+
permissions: {}
9+
10+
jobs:
11+
release:
12+
name: "Release"
13+
runs-on: "ubuntu-latest"
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: "Checkout the repository"
18+
uses: "actions/checkout@v4.1.0"
19+
20+
- name: "Adjust version number"
21+
shell: "bash"
22+
run: |
23+
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
24+
"${{ github.workspace }}/custom_components/lightcast/manifest.json"
25+
26+
- name: "ZIP the integration directory"
27+
shell: "bash"
28+
run: |
29+
cd "${{ github.workspace }}/custom_components/lightcast"
30+
zip lightcast.zip -r ./
31+
32+
- name: "Upload the ZIP file to the release"
33+
uses: softprops/action-gh-release@v0.1.15
34+
with:
35+
files: ${{ github.workspace }}/custom_components/lightcast/lightcast.zip

hacs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "LightCast",
3+
"filename": "lightcast.zip",
4+
"hide_default_branch": true,
5+
"homeassistant": "2023.8.0",
6+
"render_readme": true,
7+
"zip_release": true
8+
}

0 commit comments

Comments
 (0)