diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml deleted file mode 100644 index b35a1eb..0000000 --- a/.github/workflows/beta-release.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Beta Release - -on: - push: - branches: [beta-*.*.*, beta] - workflow_dispatch: - -jobs: - build_and_test: - uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest - with: - enable_coverage: false - secrets: - token: ${{ secrets.GITHUB_TOKEN }} - lint: - needs: build_and_test - uses: homebridge/.github/.github/workflows/eslint.yml@latest - - publish: - needs: lint - if: ${{ github.repository == 'homebridge-plugins/homebridge-plugin-update-check' }} - permissions: - id-token: write - uses: homebridge/.github/.github/workflows/npm-publish-esm.yml@latest - with: - tag: 'beta' - dynamically_adjust_version: true - npm_version_command: 'pre' - pre_id: 'beta' - secrets: - npm_auth_token: ${{ secrets.npm_token }} - - pre-release: - needs: publish - if: ${{ github.repository == 'homebridge-plugins/homebridge-plugin-update-check' }} - uses: homebridge/.github/.github/workflows/pre-release.yml@latest - with: - npm_version: ${{ needs.publish.outputs.NPM_VERSION }} - body: | - **Beta Release** - **Version**: v${{ needs.publish.outputs.NPM_VERSION }} - [How To Test Beta Releases](https://github.com/homebridge-plugins/homebridge-plugin-update-check/wiki/Beta-Version) - - github-releases-to-discord: - name: Discord Webhooks - needs: [build_and_test,publish] - if: ${{ github.repository == 'homebridge-plugins/homebridge-plugin-update-check' }} - uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest - with: - title: "Plugin Update Check Beta Release" - description: | - Version `v${{ needs.publish.outputs.NPM_VERSION }}` - url: "https://github.com/homebridge-plugins/homebridge-plugin-update-check/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}" - secrets: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_BETA || secrets.DISCORD_WEBHOOK_URL_LATEST }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 7087a78..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Node Build - -on: - push: - branches: [latest] - pull_request: - workflow_dispatch: - -jobs: - build_and_test: - uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest - with: - enable_coverage: false - secrets: - token: ${{ secrets.GITHUB_TOKEN }} - lint: - needs: build_and_test - uses: homebridge/.github/.github/workflows/eslint.yml@latest diff --git a/.github/workflows/changerelease.yml b/.github/workflows/changerelease.yml deleted file mode 100644 index 135b42d..0000000 --- a/.github/workflows/changerelease.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Changelog to Release - -on: - release: - types: [published] - -jobs: - changerelease: - uses: homebridge/.github/.github/workflows/change-release.yml@latest - secrets: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml deleted file mode 100644 index 727d05e..0000000 --- a/.github/workflows/pr-check.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PR Checks - -on: - pull_request: - types: [opened, edited, synchronize, reopened] - branches: - - latest - -jobs: - prepare-beta: - uses: homebridge/.github/.github/workflows/update-beta-version.yml@latest - with: - base-branch: latest - secrets: - github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 1b52fa6..0000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Release Drafter - -on: - push: - branches: [latest] - pull_request: # required for autolabeler - branches: [latest] - types: [opened, reopened, synchronize, ready_for_review, review_requested] - workflow_dispatch: - -jobs: - release-drafter: - uses: homebridge/.github/.github/workflows/release-drafter.yml@latest - secrets: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbb5653..827791e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,35 +1,62 @@ -name: Release +name: Unified Release on: - release: - types: [published] + push: + branches: + - "alpha-*" + - "beta-*" + - latest + workflow_dispatch: jobs: - build_and_test: - uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest + # 1️⃣ Determine release type, ESM status, and branch name + determine-release-type: + uses: homebridge/.github/.github/workflows/determine-release-type.yml@latest with: - enable_coverage: false + ref_name: ${{ github.ref_name }} + + # 2️⃣ Update version and changelog using the scripts + update-version: + needs: determine-release-type + uses: homebridge/.github/.github/workflows/update-version.yml@latest + with: + release_type: ${{ needs.determine-release-type.outputs.release_type }} + is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }} secrets: - token: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - publish: - needs: build_and_test - if: ${{ github.repository == 'homebridge-plugins/homebridge-plugin-update-check' }} + # 3️⃣ Publish to NPM and create GitHub release + publish-release: + needs: [determine-release-type, update-version] permissions: id-token: write - uses: homebridge/.github/.github/workflows/npm-publish-esm.yml@latest + contents: write + uses: homebridge/.github/.github/workflows/publish-release.yml@latest + with: + release_type: ${{ needs.determine-release-type.outputs.release_type }} + version: ${{ needs.update-version.outputs.version }} + is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }} secrets: - npm_auth_token: ${{ secrets.npm_token }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - github-releases-to-discord: - name: Discord Webhooks - needs: [build_and_test,publish] - if: ${{ github.repository == 'homebridge-plugins/homebridge-plugin-update-check' }} - uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest + # 4️⃣ Promote branch if this is a prerelease (alpha/beta) + promote-branch: + needs: [determine-release-type, publish-release] + if: ${{ needs.determine-release-type.outputs.release_type != 'latest' && needs.determine-release-type.outputs.release_type != 'skip' }} + uses: homebridge/.github/.github/workflows/promote-branch.yml@latest with: - title: "Plugin Update Check Release" - description: | - Version `v${{ needs.publish.outputs.NPM_VERSION }}` - url: "https://github.com/homebridge-plugins/homebridge-plugin-update-check/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}" + branch_name: ${{ needs.determine-release-type.outputs.branch_name }} + release_type: ${{ needs.determine-release-type.outputs.release_type }} + is_esm: ${{ needs.determine-release-type.outputs.is_esm == 'true' }} secrets: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + # 5️⃣ Notify if any previous job fails + workflow-failure: + if: ${{ failure() }} + needs: [determine-release-type, update-version, publish-release, promote-branch] + uses: homebridge/.github/.github/workflows/report-failure.yml@latest + with: + workflow_name: ${{ github.workflow }} + job_name: ${{ github.job }} + run_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d19806..d6335fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,73 @@ -# Changelog +## [2.3.3](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.3.2...v2.3.3) (2025-09-14) -All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/) + + +## [2.3.2](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.3.1...v2.3.2) (2025-09-13) + + + +## [2.3.1](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.3.0...v2.3.1) (2025-09-04) + + + +# [2.3.0](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.2.1...v2.3.0) (2025-08-18) + + + +## [2.2.1](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.1.0...v2.2.1) (2025-08-17) + + + +# [2.1.0](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.0.2...v2.1.0) (2025-08-09) + + + +## [2.0.2](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.0.1...v2.0.2) (2025-03-05) + + + +## [2.0.1](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.0.0...v2.0.1) (2025-01-26) + + + +## [1.0.2](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v1.0.1...v1.0.2) (2022-03-26) + + + +## [1.0.1](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v1.0.0...v1.0.1) (2022-01-15) + + + +# [1.0.0](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v0.2.1...v1.0.0) (2022-01-15) + + + +## [0.2.1](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v0.2.0...v0.2.1) (2021-02-20) + + + +# [0.2.0](https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v0.1.1...v0.2.0) (2021-02-20) + + + +## 0.1.1 (2021-02-19) + + + + +## [2.3.3](https://github.com/homebridge-plugins/homebridge-plugin-update-check/releases/tag/v2.3.3) (2025-09-14) + +### What's Changed +- v2.3.3 ([948e9c2](https://github.com/homebridge-plugins/homebridge-plugin-update-check/commit/948e9c22d6ad5d040864407a81a8a309228825e4)) + +**Full Changelog**: https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.3.2...v2.3.3 + +## [2.3.3](https://github.com/homebridge-plugins/homebridge-plugin-update-check/releases/tag/v2.3.3) (2025-09-14) + +### What's Changed +- v2.3.3 ([b7a4c9e](https://github.com/homebridge-plugins/homebridge-plugin-update-check/commit/b7a4c9ec2b079b6f3e51411311573080b281d97c)) + +**Full Changelog**: https://github.com/homebridge-plugins/homebridge-plugin-update-check/compare/v2.3.2...v2.3.3 ## [2.3.2](https://github.com/homebridge-plugins/homebridge-plugin-update-check/releases/tag/v2.3.2) (2025-09-13) diff --git a/README.md b/README.md index f29e3c1..f935ac3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # homebridge-plugin-update-check -[![npm](https://img.shields.io/npm/v/homebridge-plugin-update-check) ![npm](https://img.shields.io/npm/dt/homebridge-plugin-update-check)](https://www.npmjs.com/package/homebridge-plugin-update-check) [![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins) +[![npm](https://img.shields.io/npm/v/@homebridge-plugins/homebridge-plugin-update-check) ![npm](https://img.shields.io/npm/dt/@homebridge-plugins/homebridge-plugin-update-check)](https://www.npmjs.com/package/@homebridge-plugins/homebridge-plugin-update-check) [![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins) A [Homebridge](https://github.com/nfarina/homebridge) plugin for checking for updates to Homebridge and plugins. diff --git a/package-lock.json b/package-lock.json index 6ab82d2..2fb21d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@homebridge-plugins/homebridge-plugin-update-check", - "version": "2.3.2", + "version": "2.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@homebridge-plugins/homebridge-plugin-update-check", - "version": "2.3.2", + "version": "2.3.3", "funding": [ { "type": "kofi", diff --git a/package.json b/package.json index 5ff6787..66b77ac 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@homebridge-plugins/homebridge-plugin-update-check", "displayName": "Homebridge Plugin Update Check", "type": "module", - "version": "2.3.2", + "version": "2.3.3", "description": "A Homebridge plugin for checking for updates to Homebridge and plugins", "author": "David Maher", "license": "BSD-2-Clause", @@ -104,4 +104,4 @@ "typescript": "^5.9.2", "vitest": "^3.0.7" } -} +} \ No newline at end of file