Skip to content

Commit 0acb9c4

Browse files
committed
build: add release workflow
1 parent 8b4b3d6 commit 0acb9c4

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
name: Tarif EDF release
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: "Set version number"
16+
run: |
17+
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
18+
"${{ github.workspace }}/custom_components/tarif_edf/manifest.json"
19+
# Pack the HACS dir as a zip and upload to the release
20+
- name: ZIP Tarif EDF Dir
21+
run: |
22+
cd "${{ github.workspace }}/custom_components/tarif_edf"
23+
zip tarif_edf.zip -r ./
24+
- name: Upload zip to release
25+
uses: softprops/[email protected]
26+
with:
27+
files: ${{ github.workspace }}/custom_components/tarif_edf/tarif_edf.zip

hacs.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "Tarif EDF",
33
"country": "FR",
4-
"render_readme": true
4+
"render_readme": true,
5+
"zip_release": true,
6+
"filename": "tarif_edf.zip"
57
}

0 commit comments

Comments
 (0)