Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/release-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,38 @@ jobs:
run: |
uv pip install --upgrade twine
twine upload --skip-existing *.whl

discord-notify:
name: Discord Release Notification
runs-on: ubuntu-latest
needs: [release]
if: always() && needs.release.result == 'success'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build and send Discord notification
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
PREV_TAG=$(git tag --sort=-v:refname | grep -E '^v[0-9]' | sed -n '2p')
CHANGELOG=$(git log "${PREV_TAG}..HEAD" --pretty=format:"- %s" --no-merges | grep -v "^- Release ")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

read -r -d '' MESSAGE << EOM || true
Hey @everyone 👋

**Release Robyn v${VERSION}**

${CHANGELOG}

Upgrade: \`pip install --upgrade robyn\`

https://github.com/sparckles/Robyn/releases/tag/v${VERSION}
EOM

PAYLOAD=$(jq -n --arg msg "$MESSAGE" '{content: $msg}')

curl -f -H "Content-Type: application/json" \
-d "$PAYLOAD" \
"$DISCORD_WEBHOOK_URL"
Loading