From 4531ef7d10c826f10ba14ad43d3e4053153addad Mon Sep 17 00:00:00 2001 From: "zc.zhang" Date: Mon, 17 Apr 2023 17:49:36 +0800 Subject: [PATCH] fix zcloak-ci-ghact-app ci, publish github release error --- .changeset/curly-singers-repair.md | 5 +++++ packages/dev/scripts/zcloak-ci-ghact-app.mjs | 21 +++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 .changeset/curly-singers-repair.md diff --git a/.changeset/curly-singers-repair.md b/.changeset/curly-singers-repair.md new file mode 100644 index 0000000..2c8a115 --- /dev/null +++ b/.changeset/curly-singers-repair.md @@ -0,0 +1,5 @@ +--- +"@zcloak/dev": patch +--- + +fix zcloak-ci-ghact-app ci, publish github release error diff --git a/packages/dev/scripts/zcloak-ci-ghact-app.mjs b/packages/dev/scripts/zcloak-ci-ghact-app.mjs index 03fc74d..78a4c7b 100755 --- a/packages/dev/scripts/zcloak-ci-ghact-app.mjs +++ b/packages/dev/scripts/zcloak-ci-ghact-app.mjs @@ -89,15 +89,6 @@ async function gitPush() { const { rootPackage } = getPackagesSync(process.cwd()); const version = rootPackage.packageJson.version; - execSync('git add --all .'); - - // add the skip checks for GitHub ... - execSync( - `git commit --no-status --quiet -m "chore: release/${version.includes('-') ? 'beta' : 'stable'} ${version}"` - ); - - execSync(`git push ${repo} HEAD:${process.env.GITHUB_REF}`, true); - // if it is not beta, write changelog if (!version.includes('-')) { const stream = conventionalChangelog( @@ -134,7 +125,19 @@ async function gitPush() { ${content}` ) ); + } + execSync('git add --all .'); + + // add the skip checks for GitHub ... + execSync( + `git commit --no-status --quiet -m "chore: release/${version.includes('-') ? 'beta' : 'stable'} ${version}"` + ); + + execSync(`git push ${repo} HEAD:${process.env.GITHUB_REF}`, true); + + // if it is not beta, write changelog + if (!version.includes('-')) { const files = process.env.GH_RELEASE_FILES ? `--assets ${process.env.GH_RELEASE_FILES}` : ''; execSync(`yarn zcloak-exec-ghrelease ${files} --yes`);