-
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.05 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
name: Release
on:
release:
permissions:
contents: write
jobs:
hacs:
name: HACS Action
runs-on: "ubuntu-latest"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get tag from commit summary
run: |
echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Set version to release tag
run: |
sed -i "s/GITHUB_RELEASE_VERSION/${{ env.tag }}/g" custom_components/ankermake/manifest.json
sed -i "s/GITHUB_RELEASE_VERSION/${{ env.tag }}/g" custom_components/ankermake/const.py
- name: Zip custom_components/ankermake
run: zip -r ankermake.zip custom_components/ankermake
- name: Upload release asset to the existing release
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ankermake.zip
asset_name: ankermake.zip
asset_content_type: application/zip
overwrite: true