Skip to content

Commit 6b88211

Browse files
Merge pull request jax-ml#27309 from jax-ml:discord
PiperOrigin-RevId: 741678068
2 parents eb54cd2 + 93c6bb7 commit 6b88211

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release Actions
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
discord_release:
9+
if: github.repository_owner == 'jax-ml'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Get release URL
13+
id: get-release-url
14+
run: |
15+
URL="https://docs.jax.dev/en/latest/changelog.html"
16+
echo "::set-output name=URL::$URL"
17+
- name: Get content
18+
uses: 2428392/gh-truncate-string-action@b3ff790d21cf42af3ca7579146eedb93c8fb0757 # v1.4.1
19+
id: get-content
20+
with:
21+
stringToTruncate: |
22+
JAX [${{ github.event.release.tag_name }}](<${{ steps.get-release-url.outputs.URL }}>) was just released!
23+
24+
${{ github.event.release.body }}
25+
maxLength: 2000
26+
truncationSymbol: "..."
27+
- name: Discord Webhook Action
28+
uses: tsickert/discord-webhook@c840d45a03a323fbc3f7507ac7769dbd91bfb164 # v5.3.0
29+
with:
30+
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
31+
content: ${{ steps.get-content.outputs.string }}

0 commit comments

Comments
 (0)