diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 079316e..8c4cfac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Create Release +name: Create Release and Notify Discord on: push: @@ -30,15 +30,29 @@ jobs: found { print } " "$CHANGELOG") - echo "--- Extracted body ---" - echo "$BODY" - echo "body<> $GITHUB_OUTPUT echo "$BODY" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Create GitHub Release + id: create_release uses: softprops/action-gh-release@v2 with: body: ${{ steps.changelog.outputs.body }} - make_latest: true \ No newline at end of file + make_latest: true + + - name: Send Discord Notification + uses: sarisia/actions-status-discord@v1 + if: success() + with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} + content: "@everyone A new update has been published!" + title: "🍁 Release ${{ github.ref_name }}" + description: | + ${{ steps.changelog.outputs.body }} + + [View Full Release on GitHub](${{ steps.create_release.outputs.url || format('https://github.com/{0}/releases/tag/{1}', github.repository, github.ref_name) }}) + + color: 0xA728F3 + username: Nova Release + avatar_url: https://raw.githubusercontent.com/nova-guild/nova/main/nova-release.png \ No newline at end of file diff --git a/.github/workflows/release_notify.yml b/.github/workflows/release_notify.yml deleted file mode 100644 index 4a533d9..0000000 --- a/.github/workflows/release_notify.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Discord Release Notifier - -on: - release: - types: [published] - -jobs: - discord-notification: - runs-on: ubuntu-latest - steps: - - name: Send Release to Discord - uses: sarisia/actions-status-discord@v1 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - content: "@everyone A new update is available!" - title: "🍁 ${{ github.event.release.name || github.event.release.tag_name }}" - description: | - ${{ github.event.release.body }} - - [View Full Changelog on GitHub](${{ github.event.release.html_url }}) - - color: 0xA728F3 \ No newline at end of file diff --git a/nova-release.png b/nova-release.png new file mode 100644 index 0000000..077454e Binary files /dev/null and b/nova-release.png differ