Skip to content

Commit 4d8dd46

Browse files
committed
update dependencies
1 parent fc6554e commit 4d8dd46

24 files changed

+2149
-2264
lines changed

.github/workflows/beta-release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818

1919
publish:
2020
needs: lint
21-
if: ${{ github.repository == 'homebridge-plugins/homebridge-rainbird' }}
2221
permissions:
2322
id-token: write
2423
uses: homebridge/.github/.github/workflows/npm-publish-esm.yml@latest
@@ -32,7 +31,6 @@ jobs:
3231

3332
pre-release:
3433
needs: publish
35-
if: ${{ github.repository == 'homebridge-plugins/homebridge-rainbird' }}
3634
uses: homebridge/.github/.github/workflows/pre-release.yml@latest
3735
with:
3836
npm_version: ${{ needs.publish.outputs.NPM_VERSION }}
@@ -44,12 +42,11 @@ jobs:
4442
github-releases-to-discord:
4543
name: Discord Webhooks
4644
needs: [build_and_test,publish]
47-
if: ${{ github.repository == 'homebridge-plugins/homebridge-rainbird' }}
4845
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
4946
with:
50-
title: "RainBird Beta Release"
47+
title: "Rainbird Beta Release"
5148
description: |
5249
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
5350
url: "https://github.com/homebridge-plugins/homebridge-rainbird/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
5451
secrets:
55-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA || secrets.DISCORD_WEBHOOK_URL_LATEST }}
52+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}

.github/workflows/build.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/changerelease.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/labeler.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 57 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,75 @@
1-
name: Release
1+
name: Unified Release
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
branches:
6+
#- "alpha-*"
7+
#- "beta-*"
8+
- latest
9+
workflow_dispatch:
610

711
jobs:
8-
build_and_test:
9-
uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
12+
# 1️⃣ Determine release type, ESM status, and branch name
13+
determine-release-type:
14+
uses: homebridge/.github/.github/workflows/determine-release-type.yml@latest
1015
with:
11-
enable_coverage: false
16+
ref_name: ${{ github.ref_name }}
17+
18+
# 2️⃣ Update version and changelog using the scripts
19+
update-version:
20+
needs: determine-release-type
21+
uses: homebridge/.github/.github/workflows/update-version.yml@latest
22+
with:
23+
release_type: ${{ needs.determine-release-type.outputs.release_type }}
24+
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
1225
secrets:
13-
token: ${{ secrets.GITHUB_TOKEN }}
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1427

15-
publish:
16-
needs: build_and_test
17-
if: ${{ github.repository == 'homebridge-plugins/homebridge-rainbird' }}
28+
# 3️⃣ Publish to NPM and create GitHub release
29+
publish-release:
30+
needs: [determine-release-type, update-version]
1831
permissions:
1932
id-token: write
20-
uses: homebridge/.github/.github/workflows/npm-publish-esm.yml@latest
33+
contents: write
34+
uses: homebridge/.github/.github/workflows/publish-release.yml@latest
35+
with:
36+
release_type: ${{ needs.determine-release-type.outputs.release_type }}
37+
version: ${{ needs.update-version.outputs.version }}
38+
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
39+
secrets:
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
42+
# 4️⃣ Promote branch if this is a prerelease (alpha/beta)
43+
promote-branch:
44+
needs: [determine-release-type, publish-release]
45+
if: ${{ needs.determine-release-type.outputs.release_type != 'latest' && needs.determine-release-type.outputs.release_type != 'skip' }}
46+
uses: homebridge/.github/.github/workflows/promote-branch.yml@latest
47+
with:
48+
branch_name: ${{ needs.determine-release-type.outputs.branch_name }}
49+
release_type: ${{ needs.determine-release-type.outputs.release_type }}
50+
is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }}
2151
secrets:
22-
npm_auth_token: ${{ secrets.npm_token }}
52+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
54+
# 5️⃣ Notify if any previous job fails
55+
workflow-failure:
56+
if: ${{ failure() }}
57+
needs: [determine-release-type, update-version, publish-release, promote-branch]
58+
uses: homebridge/.github/.github/workflows/report-failure.yml@latest
59+
with:
60+
workflow_name: ${{ github.workflow }}
61+
job_name: ${{ github.job }}
62+
run_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
2363

64+
# 6️⃣ Post to Discord
2465
github-releases-to-discord:
2566
name: Discord Webhooks
26-
needs: [build_and_test,publish]
27-
if: ${{ github.repository == 'homebridge-plugins/homebridge-rainbird' }}
67+
needs: [determine-release-type, update-version, publish-release]
2868
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
2969
with:
30-
title: "RainBird Release"
70+
title: "Rainbird Release"
3171
description: |
32-
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
33-
url: "https://github.com/homebridge-plugins/homebridge-rainbird/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
72+
Version `v${{ needs.update-version.outputs.version }}`
73+
url: "https://github.com/homebridge-plugins/homebridge-rainbird/releases/tag/v${{ needs.update-version.outputs.version }}"
3474
secrets:
3575
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}

docs/assets/dmt/dmt-component-data.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)