From adcac6d895a2645ead0773fb2fd68827f44c146c Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Fri, 2 Feb 2024 23:11:48 -0600 Subject: [PATCH] update actions --- .github/workflows/beta-release.yml | 14 ++++++++++++++ .github/workflows/changerelease.yml | 14 ++++++-------- .github/workflows/dependabot.yml | 10 +++------- .github/workflows/discord-webhooks.yml | 17 ----------------- .github/workflows/labeler.yml | 9 +-------- .github/workflows/release-drafter.yml | 8 +++++--- .github/workflows/release.yml | 12 ++++++++++++ 7 files changed, 41 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/discord-webhooks.yml diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index 08004946..ec1b76d8 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -3,6 +3,8 @@ name: Node-CI Beta on: push: branches: [beta-*.*.*, beta] + release: + types: [prereleased] workflow_dispatch: jobs: @@ -29,3 +31,15 @@ jobs: pre_id: 'beta' secrets: npm_auth_token: ${{ secrets.npm_token }} + + github-releases-to-discord: + needs: publish + + if: ${{ github.repository == 'donavanbecker/homebridge-resideo' && github.event.release.prerelease == true }} + + uses: OpenWonderLabs/.github/.github/workflows/discord-webhooks.yml@latest + with: + footer_title: "Resideo" + secrets: + DISCORD_WEBHOOK_URL_LATEST: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} + DISCORD_WEBHOOK_URL_BETA: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }} diff --git a/.github/workflows/changerelease.yml b/.github/workflows/changerelease.yml index e66082d3..111ba973 100644 --- a/.github/workflows/changerelease.yml +++ b/.github/workflows/changerelease.yml @@ -1,13 +1,11 @@ name: Changelog to Release on: - workflow_dispatch: - push: - paths: [CHANGELOG.md] - branches: [latest] + release: + types: [published] jobs: - changerelease: - uses: donavanbecker/.github/.github/workflows/changerelease.yml@latest - secrets: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + changerelease: + uses: donavanbecker/.github/.github/workflows/changerelease.yml@latest + secrets: + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 568711a5..525d2b26 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -2,16 +2,12 @@ name: AutoDependabot on: pull_request: - branches: - - beta - - latest + branches: [ beta, latest ] pull_request_target: - branches: - - beta - - latest + branches: [ beta, latest ] jobs: - label: + dependabot: uses: donavanbecker/.github/.github/workflows/dependabot.yml@latest secrets: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/discord-webhooks.yml b/.github/workflows/discord-webhooks.yml deleted file mode 100644 index 7037ba9c..00000000 --- a/.github/workflows/discord-webhooks.yml +++ /dev/null @@ -1,17 +0,0 @@ -# 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: - uses: donavanbecker/.github/.github/workflows/discord-webhooks.yml@latest - with: - footer_title: "Meater" - secrets: - DISCORD_WEBHOOK_URL_LATEST: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} - DISCORD_WEBHOOK_URL_BETA: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }} \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index d31b349d..6eb3c01b 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,16 +1,9 @@ -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler/blob/main/README.md - name: Labeler on: [pull_request] jobs: - label: + labeler: uses: donavanbecker/.github/.github/workflows/labeler.yml@latest secrets: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 7c630a40..48588fcb 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,11 +2,13 @@ name: Release Drafter on: push: - branches: - - latest + branches: [latest] + pull_request: # required for autolabeler + types: [opened, reopened, synchronize] + workflow_dispatch: jobs: release-drafter: uses: donavanbecker/.github/.github/workflows/release-drafter.yml@latest secrets: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d78132aa..d814d526 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,3 +22,15 @@ jobs: uses: donavanbecker/.github/.github/workflows/npm-publish.yml@latest secrets: npm_auth_token: ${{ secrets.npm_token }} + + github-releases-to-discord: + needs: publish + + if: ${{ github.repository == 'donavanbecker/homebridge-august' }} + + uses: donavanbecker/.github/.github/workflows/discord-webhooks.yml@latest + with: + footer_title: "Resideo" + secrets: + DISCORD_WEBHOOK_URL_LATEST: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} + DISCORD_WEBHOOK_URL_BETA: ${{ secrets.DISCORD_WEBHOOK_URL_BETA }}