Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cfe316cca1 | ||
|
|
fcc6073298 | ||
|
|
489a868a4d | ||
|
|
7afe64d14c | ||
|
|
c366bc457a | ||
|
|
fa4d133d50 |
@@ -5,6 +5,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
- master
|
||||||
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-version:
|
update-version:
|
||||||
@@ -42,5 +43,4 @@ jobs:
|
|||||||
unset GITHUB_SERVER_URL
|
unset GITHUB_SERVER_URL
|
||||||
unset GITHUB_API_URL
|
unset GITHUB_API_URL
|
||||||
unset GITHUB_REPOSITORY
|
unset GITHUB_REPOSITORY
|
||||||
|
|
||||||
semantic-release version
|
semantic-release version
|
||||||
@@ -4,10 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
workflow_dispatch: # Позволяет запускать вручную
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Шаг 1: Валидация структуры HA интеграции
|
|
||||||
validate:
|
validate:
|
||||||
name: Validate Integration
|
name: Validate Integration
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -23,7 +22,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
category: "integration"
|
category: "integration"
|
||||||
|
|
||||||
# Шаг 2: Запуск тестов (если есть)
|
|
||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -51,7 +49,6 @@ jobs:
|
|||||||
echo "No tests directory found, skipping tests"
|
echo "No tests directory found, skipping tests"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Шаг 3: Проверка стиля кода
|
|
||||||
lint:
|
lint:
|
||||||
name: Code Quality
|
name: Code Quality
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -77,7 +74,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ruff check custom_components/motion_light/ || echo "Ruff issues found"
|
ruff check custom_components/motion_light/ || echo "Ruff issues found"
|
||||||
|
|
||||||
# Шаг 4: Создание релиза (только если все проверки пройдены)
|
|
||||||
release:
|
release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -97,6 +93,15 @@ jobs:
|
|||||||
TAG=${GITHUB_REF#refs/tags/}
|
TAG=${GITHUB_REF#refs/tags/}
|
||||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# Проверяем, это beta или stable релиз
|
||||||
|
if [[ "$TAG" == *"beta"* ]]; then
|
||||||
|
echo "is_beta=true" >> $GITHUB_OUTPUT
|
||||||
|
PRERELEASE_FLAG="--prerelease"
|
||||||
|
else
|
||||||
|
echo "is_beta=false" >> $GITHUB_OUTPUT
|
||||||
|
PRERELEASE_FLAG=""
|
||||||
|
fi
|
||||||
|
|
||||||
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
|
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
|
||||||
|
|
||||||
if [ -z "$PREV_TAG" ]; then
|
if [ -z "$PREV_TAG" ]; then
|
||||||
@@ -115,18 +120,26 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
TAG="${{ steps.tag.outputs.tag }}"
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
COMMITS="${{ steps.tag.outputs.commits }}"
|
COMMITS="${{ steps.tag.outputs.commits }}"
|
||||||
|
IS_BETA="${{ steps.tag.outputs.is_beta }}"
|
||||||
|
|
||||||
echo "🚀 Создаём релиз $TAG в GitHub..."
|
echo "🚀 Создаём релиз $TAG в GitHub..."
|
||||||
|
|
||||||
|
if [ "$IS_BETA" = "true" ]; then
|
||||||
|
TITLE="Beta Release $TAG"
|
||||||
|
else
|
||||||
|
TITLE="Release $TAG"
|
||||||
|
fi
|
||||||
|
|
||||||
cat > /tmp/release_notes.md << EOF
|
cat > /tmp/release_notes.md << EOF
|
||||||
## Изменения в версии $TAG
|
## $TITLE
|
||||||
|
|
||||||
$COMMITS
|
$COMMITS
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
gh release create "$TAG" \
|
gh release create "$TAG" \
|
||||||
--title "Release $TAG" \
|
--title "$TITLE" \
|
||||||
--notes-file /tmp/release_notes.md \
|
--notes-file /tmp/release_notes.md \
|
||||||
--target main
|
--target main \
|
||||||
|
${IS_BETA:+--prerelease}
|
||||||
|
|
||||||
echo "✅ Релиз создан!"
|
echo "✅ Релиз создан!"
|
||||||
@@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
<!-- version list -->
|
<!-- version list -->
|
||||||
|
|
||||||
|
## v1.1.0 (2026-07-22)
|
||||||
|
|
||||||
|
|
||||||
|
## v1.1.0-beta.1 (2026-07-22)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Add dev branch for beta releases
|
||||||
|
([`fa4d133`](https://git.darkmode.duckdns.org/sirmrak/motion_light/commit/fa4d133d50e896428883919c98ef830780aacce2))
|
||||||
|
|
||||||
|
|
||||||
## v1.0.17 (2026-07-17)
|
## v1.0.17 (2026-07-17)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -8,5 +8,5 @@
|
|||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
|
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"version": "1.0.17"
|
"version": "1.1.0"
|
||||||
}
|
}
|
||||||
@@ -15,10 +15,17 @@ type = "gitea"
|
|||||||
domain = "git.darkmode.duckdns.org"
|
domain = "git.darkmode.duckdns.org"
|
||||||
api_domain = "git.darkmode.duckdns.org"
|
api_domain = "git.darkmode.duckdns.org"
|
||||||
|
|
||||||
|
# Настройки для stable релизов (ветка main)
|
||||||
[tool.semantic_release.branches.main]
|
[tool.semantic_release.branches.main]
|
||||||
match = "(main|master)"
|
match = "(main|master)"
|
||||||
prerelease = false
|
prerelease = false
|
||||||
|
|
||||||
|
# Настройки для beta релизов (ветка dev)
|
||||||
|
[tool.semantic_release.branches.dev]
|
||||||
|
match = "dev"
|
||||||
|
prerelease = true
|
||||||
|
prerelease_token = "beta"
|
||||||
|
|
||||||
[tool.semantic_release.commit_parser_options]
|
[tool.semantic_release.commit_parser_options]
|
||||||
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "revert"]
|
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "revert"]
|
||||||
minor_tags = ["feat"]
|
minor_tags = ["feat"]
|
||||||
|
|||||||
Reference in New Issue
Block a user