2323 - name : Setup Dev Environment
2424 uses : ./.github/actions/setup-dev-env
2525
26- - name : Build documentation
27- run : mise run docs
2826
2927 - name : Build distribution
3028 run : uv build
@@ -45,10 +43,15 @@ jobs:
4543
4644 # Export release notes for Slack notification
4745 # Convert markdown links [text](url) to Slack format <url|text>
48- # Truncate to 2900 chars for Slack's ~3000 char limit
46+ # If notes exceed Slack's ~3000 char limit, truncate and add link to full release notes
4947 # Escape for JSON (backslashes, quotes, newlines)
50- NOTES=$(sed -E 's/\[([^]]+)\]\(([^)]+)\)/<\2|\1>/g' RELEASE_NOTES.md | head -c 2900 | \
51- sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
48+ NOTES_CONVERTED=$(sed -E 's/\[([^]]+)\]\(([^)]+)\)/<\2|\1>/g' RELEASE_NOTES.md)
49+ RELEASE_URL="${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}"
50+ if [ "$(printf '%s' "$NOTES_CONVERTED" | wc -c)" -gt 2700 ]; then
51+ NOTES_TRUNCATED=$(printf '%s' "$NOTES_CONVERTED" | head -c 2700)
52+ NOTES_CONVERTED="${NOTES_TRUNCATED}"$'\n'"...<${RELEASE_URL}|Read full release notes>"
53+ fi
54+ NOTES=$(printf '%s' "$NOTES_CONVERTED" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
5255 echo "RELEASE_NOTES_CONTENT=$NOTES" >> $GITHUB_ENV
5356
5457
6972
7073 - name : Send Slack release notification
7174 if : success()
72- uses : slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
75+ uses : slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
7376 with :
7477 method : chat.postMessage
7578 token : ${{ secrets.SLACK_RELEASE_BOT_TOKEN }}
76- payload : ' {"channel":"#announce-foundry","text":"🚀 aignostics-foundry-core ${{ github.ref_name }} released","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"🚀 *aignostics-foundry-core * <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> released"}},{"type":"section","text":{"type":"mrkdwn","text":"${{ env.RELEASE_NOTES_CONTENT }}"}}]}'
79+ payload : ' {"channel":"#announce-foundry","text":"🚀 Foundry Python Core ${{ github.ref_name }} released","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"🚀 *Foundry Python Core * <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}> released"}},{"type":"section","text":{"type":"mrkdwn","text":"${{ env.RELEASE_NOTES_CONTENT }}"}}]}'
0 commit comments