From 3191a946a805ac21c28933b28821c0ac977b5210 Mon Sep 17 00:00:00 2001 From: xilesun <2013xile@gmail.com> Date: Wed, 6 Nov 2024 14:34:25 +0800 Subject: [PATCH] fix(ci): changelog-and-release.yml --- .github/workflows/changelog-and-release.yml | 1 + scripts/release/changelogAndRelease.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changelog-and-release.yml b/.github/workflows/changelog-and-release.yml index 84771e485e..d34d52fcff 100644 --- a/.github/workflows/changelog-and-release.yml +++ b/.github/workflows/changelog-and-release.yml @@ -88,6 +88,7 @@ jobs: PRO_PLUGIN_REPOS: ${{ steps.get-info.outputs.proRepos }} GH_TOKEN: ${{ steps.app-token.outputs.token }} - name: Commit and push + if: ${{ steps.get-info.outputs.version == 'beta' }} run: | git pull origin main git add . diff --git a/scripts/release/changelogAndRelease.js b/scripts/release/changelogAndRelease.js index afd3e84a13..b2c9d639bb 100644 --- a/scripts/release/changelogAndRelease.js +++ b/scripts/release/changelogAndRelease.js @@ -372,7 +372,7 @@ async function getVersion() { if (!from || !to) { // git tag -l --sort=version:refname | grep "v*-ver" | tail -2 const tagPattern = `v*-${ver}`; - const { stdout: tags } = await execa(`git tag -l --sort=version:refname | grep "${tagPattern}" | tail -2`, { + const { stdout: tags } = await execa(`git tag -l --sort=creatordate | grep "${tagPattern}" | tail -2`, { shell: true, }); [from, to] = tags.split('\n');