mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-04-28 03:21:12 +00:00
feat: add GitHub Action to automatically publish release notes to Discord changelog channel.
This commit is contained in:
parent
2cf80e6615
commit
7355a4f152
28
.github/workflows/discord-release.yml
vendored
Normal file
28
.github/workflows/discord-release.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: Post Release to Discord
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
post-release-to-discord:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check if release tag starts with v4
|
||||
id: check_tag
|
||||
run: |
|
||||
if [[ "${{ github.event.release.tag_name }}" == v4* ]]; then
|
||||
echo "Tag starts with v4"
|
||||
echo "::set-output name=send_message::true"
|
||||
else
|
||||
echo "Tag does not start with v4"
|
||||
echo "::set-output name=send_message::false"
|
||||
fi
|
||||
|
||||
- name: Post release to Discord
|
||||
if: steps.check_tag.outputs.send_message == 'true'
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" -d \
|
||||
"{\"content\": \"JumpServer ${{ github.event.release.tag_name }} Released! 🚀\\n${{ github.event.release.body }}\"}" \
|
||||
$DISCORD_CHANGELOG_WEBHOOK
|
Loading…
Reference in New Issue
Block a user