Skip to content

Commit

Permalink
Create discord.yml (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
URAKOLOUY5 authored Nov 15, 2024
1 parent 242faff commit 8c822ad
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/discord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Discord Webhook

on:
push:
branches:
- development

jobs:
publish-to-workshop:
runs-on: ubuntu-latest

steps:
- name: Create Changelog
id: changelog
uses: actions/github-script@v6.3.1
env:
COMMITS: ${{ toJSON(github.event.commits) }}
with:
result-encoding: string
script: |
const commits = JSON.parse(process.env.COMMITS);
var lines = "";
for (const commit of commits) {
lines += commit.message + "\n"
}
return lines;
- name: Send Discord Webhook
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"${{ steps.changelog.outputs.result }}\"}" \
$DISCORD_WEBHOOK_URL

0 comments on commit 8c822ad

Please sign in to comment.