diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 9f54aa0..34ad775 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -8,11 +8,16 @@ 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" @@ -20,15 +25,20 @@ categories: - 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: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 3958be3..a699216 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -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/release-drafter@v6.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6155799..7cb037f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -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 @@ -25,15 +25,10 @@ jobs: uses: actions/setup-python@v5.1.1 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: | @@ -61,6 +56,7 @@ jobs: - name: Hassfest validation uses: "home-assistant/actions/hassfest@master" + tests: runs-on: "ubuntu-latest" name: Run tests diff --git a/hacs.json b/hacs.json index c5685cf..d4f50a4 100644 --- a/hacs.json +++ b/hacs.json @@ -4,5 +4,6 @@ "homeassistant": "2024.6", "render_readme": true, "zip_release": true, - "filename": "bermuda.zip" + "filename": "bermuda.zip", + "hide_default_branch": true }