diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c4cfac..92c1fd6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: with: fetch-depth: 0 - - name: Extract changelog for this version + - name: Extract and Linkify Changelog id: changelog run: | TAG="${GITHUB_REF_NAME}" @@ -30,8 +30,10 @@ jobs: found { print } " "$CHANGELOG") + LINKIFIED_BODY=$(echo "$BODY" | sed -E 's/\(#([0-9]+)\)/([#\1](https:\/\/github.com\/'"${GITHUB_REPOSITORY}"'\/pull\/\1))/g') + echo "body<> $GITHUB_OUTPUT - echo "$BODY" >> $GITHUB_OUTPUT + echo "$LINKIFIED_BODY" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Create GitHub Release @@ -47,12 +49,13 @@ jobs: with: webhook: ${{ secrets.DISCORD_WEBHOOK }} content: "@everyone A new update has been published!" - title: "🍁 Release ${{ github.ref_name }}" + notitle: true description: | - ${{ steps.changelog.outputs.body }} + # [🍁 ${{ github.ref_name }}](https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}) - [View Full Release on GitHub](${{ steps.create_release.outputs.url || format('https://github.com/{0}/releases/tag/{1}', github.repository, github.ref_name) }}) + ${{ steps.changelog.outputs.body }} + nodetail: true color: 0xA728F3 username: Nova Release avatar_url: https://raw.githubusercontent.com/nova-guild/nova/main/nova-release.png \ No newline at end of file