chore(release): require notes for stable releases and remove old changelog tools (#60429)

This commit is contained in:
Aiden Cline
2026-10-29 21:37:15 -05:00
committed by GitHub
Unverified
parent 4785478249
commit c45aae77ab
8 changed files with 8 additions and 414 deletions
+5 -1
View File
@@ -3,7 +3,7 @@
# (INPUT_BUMP, INPUT_VERSION) only, and writes them to $GITHUB_OUTPUT. Nothing here reads repository files.
#
# push or dispatch on dev -> dev 0.0.0-dev-<run> npm tag dev, desktop
# dispatch on dev with bump/version -> latest x.y.z npm tag latest, releasers only
# dispatch on dev with bump/version -> latest x.y.z npm tag latest, releasers only, notes required
# push or dispatch on beta -> beta 0.0.0-beta-<run> desktop only
# pull_request -> pr 0.0.0-pr-<run> everything, dry run
#
@@ -20,6 +20,10 @@ case "$GITHUB_EVENT_NAME:$GITHUB_REF:$versioned" in
*) die "$GITHUB_EVENT_NAME on $GITHUB_REF cannot publish (versioned: $versioned)" ;;
esac
if [ "$channel" = latest ] && [ -z "${INPUT_RELEASE_NOTES//[[:space:]]/}" ]; then
die "Stable releases need release notes; generate them with ./script/release.ts --print"
fi
if [ "$channel" = latest ]; then
actor=${GITHUB_TRIGGERING_ACTOR:-${GITHUB_ACTOR:-}}
[ -n "$actor" ] || die "Stable releases can only be started by releasers; the triggering actor is unknown"
+1 -1
View File
@@ -9,7 +9,7 @@ payload=$(jq -n --arg tag "$tag" --arg notes "${OPENCODE_RELEASE_NOTES:-}" \
($notes | if length > 4000 then .[:4000] + "\n\n[Full release notes](\($url))" else . end) as $description |
{
allowed_mentions: {parse: []},
embeds: [{title: "OpenCode V2 \($tag)", url: $url, color: 2829099} + if $description == "" then {} else {description: $description} end]
embeds: [{title: "OpenCode V2 \($tag)", url: $url, description: $description, color: 2829099}]
}')
echo "$payload" | jq .
if dry_run; then exit 0; fi
+2 -1
View File
@@ -24,7 +24,7 @@ on:
required: false
type: string
release_notes:
description: "Reviewed V2 release notes for CHANGELOG.md and the GitHub release (optional)"
description: "Reviewed V2 release notes for CHANGELOG.md and the GitHub release (required with bump or version)"
required: false
type: string
@@ -72,6 +72,7 @@ jobs:
GH_TOKEN: ${{ github.token }} # reads the triggering actor's repository role for stable releases
INPUT_BUMP: ${{ inputs.bump }}
INPUT_VERSION: ${{ inputs.version }}
INPUT_RELEASE_NOTES: ${{ inputs.release_notes }}
# A versioned release builds from a commit with its versions and changelog on the dispatched dev commit,
# tagged v<version>. Runs git only.