Skip to content

Commit b72b67d

Browse files
committed
feat(action): add actions for release
1 parent 2ca21af commit b72b67d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/release.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Create Config Zip
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
zip-config:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Get tag version
16+
run: echo "TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
17+
18+
- name: Create ZIP excluding files
19+
run: |
20+
zip -r homeassistant-config-${TAG_VERSION}.zip . \
21+
-x "secrets [REDACTED].yaml" \
22+
-x ".gitignore" \
23+
-x "images/*" \
24+
-x ".git/*" \
25+
-x ".github/*"
26+
27+
- name: Upload ZIP artifact
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: homeassistant-config-${{ env.TAG_VERSION }}
31+
path: homeassistant-config-${{ env.TAG_VERSION }}.zip

0 commit comments

Comments
 (0)