-
-
Notifications
You must be signed in to change notification settings - Fork 10
39 lines (36 loc) · 1.26 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release
on:
workflow_dispatch:
release:
types: [published]
env:
COMPONENT_DIR: danfoss_ally
jobs:
release_zip_file:
name: Prepare release asset
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Update manifest.json version to ${{ github.event.release.tag_name }}
run: |
python3 ${{ github.workspace }}/.github/scripts/update_hacs_manifest.py --version ${{ github.event.release.tag_name }} --path /custom_components/danfoss_ally/
- name: Commit manifest update
run: |
git config user.name github-actions
git config user.email [email protected]
git add ./custom_components/danfoss_ally/manifest.json
git commit -m "Updated manifest.json"
git push origin HEAD:master
- name: Create zip
run: |
cd custom_components/danfoss_ally
zip danfoss_ally.zip -r ./
- name: Upload zip to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./custom_components/danfoss_ally/danfoss_ally.zip
asset_name: danfoss_ally.zip
tag: ${{ github.ref }}
overwrite: true