Skip to content

Commit

Permalink
fix zcloak-ci-ghact-app ci, publish github release error
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcwoshizz committed Apr 17, 2023
1 parent 0d75972 commit 4531ef7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/curly-singers-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zcloak/dev": patch
---

fix zcloak-ci-ghact-app ci, publish github release error
21 changes: 12 additions & 9 deletions packages/dev/scripts/zcloak-ci-ghact-app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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`);
Expand Down

0 comments on commit 4531ef7

Please sign in to comment.