Skip to content

Commit eddedc5

Browse files
committed
Merge branch 'latest' into beta-3.0.4
2 parents 92c24b3 + d424e86 commit eddedc5

File tree

7 files changed

+59
-85
lines changed

7 files changed

+59
-85
lines changed

.github/workflows/beta-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
if: ${{ github.repository == 'homebridge-plugins/homebridge-august' }}
4848
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
4949
with:
50-
title: "August Beta Release"
50+
title: "Air Beta Release"
5151
description: |
5252
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
5353
url: "https://github.com/homebridge-plugins/homebridge-august/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
5454
secrets:
55-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA || secrets.DISCORD_WEBHOOK_URL_LATEST }}
55+
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA || 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/pr-check.yml

Lines changed: 0 additions & 15 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 & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,76 @@
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-august' }}
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.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-august' }}
67+
needs: [determine-release-type, update-version, publish-release]
2868
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
2969
with:
3070
title: "August Release"
3171
description: |
32-
Version `v${{ needs.publish.outputs.NPM_VERSION }}`
33-
url: "https://github.com/homebridge-plugins/homebridge-august/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}"
72+
Version `v${{ needs.update-version.outputs.version }}`
73+
url: "https://github.com/homebridge-plugins/homebridge-august/releases/tag/v${{ needs.update-version.outputs.version }}"
3474
secrets:
3575
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}
76+

0 commit comments

Comments
 (0)