From 25801fe81e8d28e44fec49277cac37f0f066f47b Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Thu, 28 Dec 2023 13:18:27 -0600 Subject: [PATCH] Discord Webhooks Separate prereleases and releases for Discord Webhooks --- .github/workflows/discord-webhooks.yml | 39 ++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/discord-webhooks.yml diff --git a/.github/workflows/discord-webhooks.yml b/.github/workflows/discord-webhooks.yml new file mode 100644 index 00000000..a71e053d --- /dev/null +++ b/.github/workflows/discord-webhooks.yml @@ -0,0 +1,39 @@ +# This is a basic workflow to help you get started with Actions + +name: Discord Webhooks + +# Controls when the workflow will run +on: + release: + types: [released, prereleased] + +jobs: + github-releases-to-discord: + runs-on: ubuntu-latest + name: GitHub Releases to Discord + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Latest Release + if: ${{ github.event.release.prerelease == false }} + uses: SethCohen/github-releases-to-discord@v1.13.1 + with: + webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} + color: "4726621" + username: "Homebridge" + avatar_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png" + footer_title: "Homebridge" + footer_icon_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png" + footer_timestamp: true + + - name: Pre-Release + if: ${{ github.event.release.prerelease == true }} + uses: SethCohen/github-releases-to-discord@v1.13.1 + with: + webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }} + color: "4726621" + username: "Homebridge" + avatar_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png" + footer_title: "Homebridge" + footer_icon_url: "https://raw.githubusercontent.com/homebridge/branding/latest/logos/homebridge-color-round-stylized.png" + footer_timestamp: true \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 908bb5a2..5ea80d81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to homebridge will be documented in this file. - Add GitHub labeler action - Improve `README` installation docs - Updated dependencies +- updated Discord Webhooks so notifications are seperated for `release` and `pre-release` ## v1.7.0 (2023-11-04)