Skip to content

chore: update version to 0.5.7 and enhance changelog with recent chan… #7

chore: update version to 0.5.7 and enhance changelog with recent chan…

chore: update version to 0.5.7 and enhance changelog with recent chan… #7

Workflow file for this run

name: Create Release and Notify Discord
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
name: Create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract and Linkify Changelog
id: changelog
run: |
TAG="${GITHUB_REF_NAME}"
CHANGELOG="docs/docs/blog/changelog.md"
BODY=$(awk "
/^## \`${TAG}\`/ { found=1; next }
found && /^## \`v[0-9]+\.[0-9]+\.[0-9]+\`/ { exit }
found { print }
" "$CHANGELOG")
LINKIFIED_BODY=$(echo "$BODY" | sed -E 's/\(#([0-9]+)\)/([#\1](https:\/\/github.com\/'"${GITHUB_REPOSITORY}"'\/pull\/\1))/g')
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$LINKIFIED_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
- 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!"
notitle: true
description: |
# [🍁 ${{ github.ref_name }}](https://github.com/${{ github.repository }}/releases/tag/${{ 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