From 0902119f1f691de048eeea1da8f84454bbb06fe9 Mon Sep 17 00:00:00 2001 From: Matt Weber Date: Mon, 22 Apr 2024 12:50:56 -0400 Subject: [PATCH] chore: ensure automated v6 release compared to v6 --- .github/workflows/release.yml | 4 +++- scripts/release.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb21a930754..b645eb5a89f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,9 @@ jobs: repo }) - if (versionTag !== releases[0]?.tag_name) { + const previousRelease = releases.find((r) => r.tag_name.startsWith('v6')) + + if (versionTag !== previousRelease?.tag_name) { return versionTag } diff --git a/scripts/release.js b/scripts/release.js index b901f8854e7..ad8e8468669 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -8,12 +8,14 @@ const generateReleaseNotes = async ({ github, owner, repo, versionTag, defaultBr repo }) + const previousRelease = releases.find((r) => r.tag_name.startsWith('v6')) + const { data: { body } } = await github.rest.repos.generateReleaseNotes({ owner, repo, tag_name: versionTag, target_commitish: defaultBranch, - previous_tag_name: releases[0]?.tag_name + previous_tag_name: previousRelease?.tag_name }) const bodyWithoutReleasePr = body.split('\n')