Skip to content

Commit

Permalink
[support-infra] Add release announcement to GitHub workflows (mui#11867)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
  • Loading branch information
michelengelen and oliviertassinari committed Apr 19, 2024
1 parent bdcf079 commit 9014774
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/discord-release-announcement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Discord Release Announcement

on:
release:
types: [prereleased, published]

permissions: {}

jobs:
delimiter-test:
runs-on: ubuntu-latest
name: Send message to discord
steps:
- name: parse and send message
uses: michelengelen/discord-message-action@02af30a15955ecf718049bc33b0efabf6f626e0b
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
username: MUI Releases
avatar-url: 'https://raw.githubusercontent.com/mui/material-ui/master/docs/public/static/logo.png'
separator: '<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->'
6 changes: 5 additions & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ yarn release:changelog
--release The branch to release (default: master)
```

You can also provide the GitHub token by setting `process.env.GITHUB_TOKEN` variable.
> :warning: the script will add a separator string in form of a comment like this right after the highlights:
> `<!--/ DO_NOT_REMOVE /-->`
> This string needs to stay where it gets inserted for the automated discord announcement to work.
You can also provide the github token by setting `process.env.GITHUB_TOKEN` variable.

In case of a problem, another method to generate the changelog is available at the end of this page.

Expand Down
2 changes: 2 additions & 0 deletions scripts/releaseChangelog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ We'd like to offer a big thanks to the ${
TODO INSERT HIGHLIGHTS
${changeLogMessages.length > 0 ? '\n\n' : ''}${changeLogMessages.join('\n')}
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
### Data Grid
#### \`@mui/x-data-grid@__VERSION__\`
Expand Down

0 comments on commit 9014774

Please sign in to comment.