Skip to content

Commit 943a992

Browse files
committed
fix: limit release notes to avoid 422 error
1 parent dd3f48d commit 943a992

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,27 @@ jobs:
184184
RELEASE_TYPE_NAME=Pre-Release
185185
PRERELEASE_ARG=--prerelease
186186
fi
187-
187+
188188
today=$(date '+%Y-%m-%d')
189+
190+
# Generate a concise changelog (last 50 commits) to stay under the 125k character limit
191+
echo "## What's Changed" > /tmp/release_notes.md
192+
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
193+
if [ -n "$PREV_TAG" ]; then
194+
git log --oneline --no-merges ${PREV_TAG}..HEAD | head -n 50 >> /tmp/release_notes.md
195+
else
196+
git log --oneline --no-merges | head -n 50 >> /tmp/release_notes.md
197+
fi
198+
echo "" >> /tmp/release_notes.md
199+
echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREV_TAG}...${{ github.ref_name }}" >> /tmp/release_notes.md
200+
189201
gh release create "$today-$tag-$run" \
190-
--repo="$GITHUB_REPOSITORY" \
191-
--title="RustPython $RELEASE_TYPE_NAME $today-$tag #$run" \
192-
--target="$tag" \
193-
--notes "⚠️ **Important**: To run RustPython, you must download both the binary for your platform AND the \`rustpython-lib.zip\` archive. Extract the Lib directory from the archive to the same location as the binary, or set the \`RUSTPYTHONPATH\` environment variable to point to the Lib directory." \
194-
--generate-notes \
195-
$PRERELEASE_ARG \
196-
bin/rustpython-release-*
202+
--repo="$GITHUB_REPOSITORY" \
203+
--title="RustPython $RELEASE_TYPE_NAME $today-$tag #$run" \
204+
--target="$tag" \
205+
--notes-file /tmp/release_notes.md \
206+
$PRERELEASE_ARG \
207+
bin/rustpython-release-*
197208
env:
198209
GH_TOKEN: ${{ github.token }}
199210
tag: ${{ github.ref_name }}

0 commit comments

Comments
 (0)