Skip to content

Commit

Permalink
Workflow and HACS changes
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
agittins committed Aug 6, 2024
1 parent 50118da commit db25d43
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
18 changes: 14 additions & 4 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,37 @@ categories:
- title: ":boom: Breaking Changes"
label: "breaking"
- title: ":rocket: Features"
label: "enhancement"
labels:
- "enhancement"
- "feat"
- title: ":fire: Removals and Deprecations"
label: "removal"
- title: ":beetle: Fixes"
label: "bug"
labels:
- "bug"
- "fix"
- "bugfix"
- title: ":racehorse: Performance"
label: "performance"
- title: ":rotating_light: Testing"
label: "testing"
- title: ":construction_worker: Continuous Integration"
label: "ci"
- title: ":books: Documentation"
label: "documentation"
labels:
- "documentation"
- "docs"
- title: ":hammer: Refactoring"
label: "refactoring"
labels:
- "refactoring"
- "chore"
- title: ":lipstick: Style"
label: "style"
- title: ":package: Dependencies"
labels:
- "dependencies"
- "build"
- "bump"

version-resolver:
major:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
name: Draft a release note
on:
push:
# Defaults to all.
branches:
- main
- master
- develop
- testing
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
pull_request_target:
types: [opened, reopened, synchronize]

jobs:
draft_release:
name: Release Drafter
runs-on: ubuntu-latest
permissions:
contents: write
# write on pr's is required for autolabeller
pull-requests: write
outputs:
resolved_version: ${{ steps.draftrelease.outputs.resolved_version }}
steps:
- name: Run release-drafter
id: draftrelease
uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 6 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ env:
DEFAULT_PYTHON: 3.12

jobs:
pre-commit:
linting:
runs-on: "ubuntu-latest"
name: Pre-commit
name: Linting
steps:
- name: Check out the repository
uses: actions/checkout@v4
Expand All @@ -25,15 +25,10 @@ jobs:
uses: actions/[email protected]
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: "pip"

- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Python modules
run: |
pip install --constraint=.github/workflows/constraints.txt pre-commit black flake8 isort
- name: "Install requirements"
run: python3 -m pip install -r requirements.txt

- name: Run pre-commit on all files
run: |
Expand Down Expand Up @@ -61,6 +56,7 @@ jobs:

- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"

tests:
runs-on: "ubuntu-latest"
name: Run tests
Expand Down
3 changes: 2 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"homeassistant": "2024.6",
"render_readme": true,
"zip_release": true,
"filename": "bermuda.zip"
"filename": "bermuda.zip",
"hide_default_branch": true
}

0 comments on commit db25d43

Please sign in to comment.