Skip to content

Commit b72cb2c

Browse files
authored
Update release.yml
1 parent bea879c commit b72cb2c

File tree

1 file changed

+36
-11
lines changed

1 file changed

+36
-11
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,54 @@
1-
name: "Release"
1+
name: "Release CI for HACS"
22

33
on:
4-
release:
5-
types:
6-
- "published"
7-
8-
permissions: {}
4+
push:
5+
tags:
6+
- 'v*'
97

108
jobs:
9+
lint:
10+
name: "Run linter (ruff)"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: "Checkout the repository"
14+
uses: "actions/checkout@v4"
15+
16+
- name: "Set up Python"
17+
uses: "actions/setup-python@v5"
18+
with:
19+
python-version: '3.12'
20+
21+
- name: "Install dependencies"
22+
run: pip install ruff
23+
24+
- name: "Run ruff check"
25+
run: ruff check .
26+
27+
- name: "Run ruff format check"
28+
run: ruff format --check .
29+
1130
release:
12-
name: "Release"
31+
name: "Create Release"
1332
runs-on: "ubuntu-latest"
33+
needs: lint
1434
permissions:
1535
contents: write
36+
1637
steps:
1738
- name: "Checkout the repository"
18-
uses: "actions/checkout@v5.0.0"
39+
uses: "actions/checkout@v4"
1940

20-
- name: "ZIP the integration directory"
41+
- name: "Create ZIP archive for HACS"
2142
shell: "bash"
2243
run: |
2344
cd "${{ github.workspace }}/custom_components/systemair"
2445
zip systemair.zip -r ./
46+
mv systemair.zip "${{ github.workspace }}/"
2547
26-
- name: "Upload the ZIP file to the release"
48+
- name: "Create GitHub Release and Upload ZIP"
2749
uses: "softprops/action-gh-release@v2"
2850
with:
29-
files: ${{ github.workspace }}/custom_components/systemair/systemair.zip
51+
tag_name: ${{ github.ref_name }}
52+
name: "Release ${{ github.ref_name }}"
53+
generate_release_notes: true
54+
files: "${{ github.workspace }}/systemair.zip"

0 commit comments

Comments
 (0)