From fa4d133d50e896428883919c98ef830780aacce2 Mon Sep 17 00:00:00 2001 From: sirmrak Date: Wed, 22 Jul 2026 09:04:38 +0300 Subject: [PATCH 1/4] feat: add dev branch for beta releases --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f8c77c3..0a76814 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,10 +15,17 @@ type = "gitea" domain = "git.darkmode.duckdns.org" api_domain = "git.darkmode.duckdns.org" +# Настройки для stable релизов (ветка main) [tool.semantic_release.branches.main] match = "(main|master)" prerelease = false +# Настройки для beta релизов (ветка dev) +[tool.semantic_release.branches.dev] +match = "dev" +prerelease = true +prerelease_token = "beta" + [tool.semantic_release.commit_parser_options] allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "revert"] minor_tags = ["feat"] -- 2.43.0 From c366bc457a6e3830a84f55c620d9a9c6f291cbf3 Mon Sep 17 00:00:00 2001 From: sirmrak Date: Wed, 22 Jul 2026 09:05:42 +0300 Subject: [PATCH 2/4] ci: add dev branch support for beta releases --- .gitea/workflows/update_version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/update_version.yml b/.gitea/workflows/update_version.yml index ed4fc66..c8a0a0a 100644 --- a/.gitea/workflows/update_version.yml +++ b/.gitea/workflows/update_version.yml @@ -5,6 +5,7 @@ on: branches: - main - master + - dev jobs: update-version: @@ -42,5 +43,4 @@ jobs: unset GITHUB_SERVER_URL unset GITHUB_API_URL unset GITHUB_REPOSITORY - semantic-release version \ No newline at end of file -- 2.43.0 From 7afe64d14c79cd11a499dd0604ea0855ffde37f6 Mon Sep 17 00:00:00 2001 From: semantic-release Date: Wed, 22 Jul 2026 06:05:53 +0000 Subject: [PATCH 3/4] chore(release): v1.1.0-beta.1 --- CHANGELOG.md | 8 ++++++++ custom_components/motion_light/manifest.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c215f3a..75b2b2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ +## 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) ### Bug Fixes diff --git a/custom_components/motion_light/manifest.json b/custom_components/motion_light/manifest.json index b43f1d3..3b9df04 100644 --- a/custom_components/motion_light/manifest.json +++ b/custom_components/motion_light/manifest.json @@ -8,5 +8,5 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/sirmrak/motion_light/issues", "requirements": [], - "version": "1.0.17" + "version": "1.1.0-beta.1" } \ No newline at end of file -- 2.43.0 From 489a868a4db183ac4ea09e6373dc08f9cbb031f5 Mon Sep 17 00:00:00 2001 From: sirmrak Date: Wed, 22 Jul 2026 09:06:46 +0300 Subject: [PATCH 4/4] ci: support beta releases in GitHub workflow --- .github/workflows/release.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2e4f3a..3350fda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,9 @@ on: push: tags: - 'v*' - workflow_dispatch: # Позволяет запускать вручную + workflow_dispatch: jobs: - # Шаг 1: Валидация структуры HA интеграции validate: name: Validate Integration runs-on: ubuntu-latest @@ -23,7 +22,6 @@ jobs: with: category: "integration" - # Шаг 2: Запуск тестов (если есть) test: name: Run Tests runs-on: ubuntu-latest @@ -51,7 +49,6 @@ jobs: echo "No tests directory found, skipping tests" fi - # Шаг 3: Проверка стиля кода lint: name: Code Quality runs-on: ubuntu-latest @@ -77,7 +74,6 @@ jobs: run: | ruff check custom_components/motion_light/ || echo "Ruff issues found" - # Шаг 4: Создание релиза (только если все проверки пройдены) release: name: Create Release runs-on: ubuntu-latest @@ -97,6 +93,15 @@ jobs: TAG=${GITHUB_REF#refs/tags/} 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 "") if [ -z "$PREV_TAG" ]; then @@ -115,18 +120,26 @@ jobs: run: | TAG="${{ steps.tag.outputs.tag }}" COMMITS="${{ steps.tag.outputs.commits }}" + IS_BETA="${{ steps.tag.outputs.is_beta }}" echo "🚀 Создаём релиз $TAG в GitHub..." + if [ "$IS_BETA" = "true" ]; then + TITLE="Beta Release $TAG" + else + TITLE="Release $TAG" + fi + cat > /tmp/release_notes.md << EOF - ## Изменения в версии $TAG + ## $TITLE $COMMITS EOF gh release create "$TAG" \ - --title "Release $TAG" \ + --title "$TITLE" \ --notes-file /tmp/release_notes.md \ - --target main + --target main \ + ${IS_BETA:+--prerelease} echo "✅ Релиз создан!" \ No newline at end of file -- 2.43.0