Skip to content

Commit db25d43

Browse files
committed
Workflow and HACS changes
- Reverted HACS back to zip releases as unable to find solution to versioning, will go to branch-based pre-releases. - Renamed workflow job pre-commit to linting. - Release-drafter config changes
1 parent 50118da commit db25d43

File tree

4 files changed

+39
-16
lines changed

4 files changed

+39
-16
lines changed

.github/release-drafter.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,37 @@ categories:
88
- title: ":boom: Breaking Changes"
99
label: "breaking"
1010
- title: ":rocket: Features"
11-
label: "enhancement"
11+
labels:
12+
- "enhancement"
13+
- "feat"
1214
- title: ":fire: Removals and Deprecations"
1315
label: "removal"
1416
- title: ":beetle: Fixes"
15-
label: "bug"
17+
labels:
18+
- "bug"
19+
- "fix"
20+
- "bugfix"
1621
- title: ":racehorse: Performance"
1722
label: "performance"
1823
- title: ":rotating_light: Testing"
1924
label: "testing"
2025
- title: ":construction_worker: Continuous Integration"
2126
label: "ci"
2227
- title: ":books: Documentation"
23-
label: "documentation"
28+
labels:
29+
- "documentation"
30+
- "docs"
2431
- title: ":hammer: Refactoring"
25-
label: "refactoring"
32+
labels:
33+
- "refactoring"
34+
- "chore"
2635
- title: ":lipstick: Style"
2736
label: "style"
2837
- title: ":package: Dependencies"
2938
labels:
3039
- "dependencies"
3140
- "build"
41+
- "bump"
3242

3343
version-resolver:
3444
major:

.github/workflows/release-drafter.yml

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
11
name: Draft a release note
22
on:
33
push:
4+
# Defaults to all.
45
branches:
56
- main
6-
- master
7+
- develop
8+
- testing
9+
pull_request:
10+
# Only following types are handled by the action, but one can default to all as well
11+
types: [opened, reopened, synchronize]
12+
# pull_request_target event is required for autolabeler to support PRs from forks
13+
pull_request_target:
14+
types: [opened, reopened, synchronize]
15+
716
jobs:
817
draft_release:
918
name: Release Drafter
1019
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
# write on pr's is required for autolabeller
23+
pull-requests: write
24+
outputs:
25+
resolved_version: ${{ steps.draftrelease.outputs.resolved_version }}
1126
steps:
1227
- name: Run release-drafter
28+
id: draftrelease
1329
uses: release-drafter/[email protected]
1430
env:
1531
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yaml

+6-10
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ env:
1414
DEFAULT_PYTHON: 3.12
1515

1616
jobs:
17-
pre-commit:
17+
linting:
1818
runs-on: "ubuntu-latest"
19-
name: Pre-commit
19+
name: Linting
2020
steps:
2121
- name: Check out the repository
2222
uses: actions/checkout@v4
@@ -25,15 +25,10 @@ jobs:
2525
uses: actions/[email protected]
2626
with:
2727
python-version: ${{ env.DEFAULT_PYTHON }}
28+
cache: "pip"
2829

29-
- name: Upgrade pip
30-
run: |
31-
pip install --constraint=.github/workflows/constraints.txt pip
32-
pip --version
33-
34-
- name: Install Python modules
35-
run: |
36-
pip install --constraint=.github/workflows/constraints.txt pre-commit black flake8 isort
30+
- name: "Install requirements"
31+
run: python3 -m pip install -r requirements.txt
3732

3833
- name: Run pre-commit on all files
3934
run: |
@@ -61,6 +56,7 @@ jobs:
6156

6257
- name: Hassfest validation
6358
uses: "home-assistant/actions/hassfest@master"
59+
6460
tests:
6561
runs-on: "ubuntu-latest"
6662
name: Run tests

hacs.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"homeassistant": "2024.6",
55
"render_readme": true,
66
"zip_release": true,
7-
"filename": "bermuda.zip"
7+
"filename": "bermuda.zip",
8+
"hide_default_branch": true
89
}

0 commit comments

Comments
 (0)