diff --git a/.github/workflows/leaves.yml b/.github/workflows/leaves.yml index 4ea8557b..d7514e32 100644 --- a/.github/workflows/leaves.yml +++ b/.github/workflows/leaves.yml @@ -11,11 +11,13 @@ on: push: branches: [ master ] pull_request: + types: closed branches: [ master ] jobs: build: runs-on: ubuntu-latest + if: github.event.pull_request.merged || github.event_name == 'push' || github.event_name == 'workflow_dispatch' steps: - name: Get repository uses: actions/checkout@v3 @@ -53,3 +55,9 @@ jobs: uses: hugo19941994/delete-draft-releases@v1.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Github Releases To Discord + uses: SethCohen/github-releases-to-discord@v1.13.0 + with: + webhook_url: ${{ secrets.DISCORD_WEBHOOK }} + username: "Leaves CI" + avatar_url: "https://avatars.githubusercontent.com/u/93428079"