Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Bug Report
description: 报告集成 bug
title: "[Bug] "
body:
- type: textarea
id: description
attributes:
label: 问题描述
placeholder: 简明描述 bug
validations:
required: true
- type: textarea
id: logs
attributes:
label: 相关日志
placeholder: Home Assistant 日志里 integration 相关的 traceback
- type: textarea
id: reproduce
attributes:
label: 复现步骤
placeholder: 1. ...
2. ...
3. ...
- type: input
id: version
attributes:
label: 版本
placeholder: manifest.json 里的 version
validations:
required: true
17 changes: 17 additions & 0 deletions .github/workflows/hacs-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: HACS

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate HACS
uses: hacs/action@main
with:
category: integration
14 changes: 14 additions & 0 deletions .github/workflows/hassfest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Validate with hassfest

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: home-assistant/actions/hassfest@master
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract changelog
shell: pwsh
run: |
$tag = "${{ github.ref_name }}" -replace '^v', ''
$file = "CHANGELOG.md"
if (!(Test-Path $file)) {
"no changelog" | Set-Content release_body.txt
exit 0
}
$in = $false; $body = @()
foreach ($line in Get-Content $file) {
if ($line -match "^## \[$tag\]") { $in = $true; continue }
if ($in -and $line -match "^## \[") { break }
if ($in) { $body += $line }
}
($body -join "`n").Trim() | Set-Content release_body.txt
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body_path: release_body.txt
generate_release_notes: true
Loading
Loading