.github/workflows/notify-release.yml

Summary

Maintainability
Test Coverage
name: notify-release

on:
  release:
    types: [published]

jobs:
  notify-discord:
    runs-on: ubuntu-22.04
    steps:
      - name: Notify Discord
        uses: fjogeleit/http-request-action@v1
        with:
          url: ${{ secrets.OKP4_DISCORD_WEBHOOK }}
          method: 'POST'
          customHeaders: '{"Content-Type": "application/json"}'
          data: |-
              {
                "avatar_url":"https://avatars.githubusercontent.com/u/98603954?v=4",
                "username":"Bot Anik",
                "content":"šŸšØ A new version of @${{github.repository}} ${{ github.event.release.tag_name }} has been released! šŸŽ‰\n\nšŸ‘‰ Changelog: https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}\nšŸ‘‰ Documentation: https://ui.okp4.space/?path=/story/welcome--page\nšŸ‘‰ Official repo: https://github.com/${{ github.repository }}\nšŸ‘‰ NPM link: https://www.npmjs.com/package/@${{ github.repository }}"
              }