diff --git a/.changeset/many-gifts-sort.md b/.changeset/many-gifts-sort.md new file mode 100644 index 00000000..7e6086a9 --- /dev/null +++ b/.changeset/many-gifts-sort.md @@ -0,0 +1,5 @@ +--- +"@changesets/action": patch +--- + +Fix tags not triggering github create event diff --git a/src/gitUtils.ts b/src/gitUtils.ts index b15151ab..9bf7a26a 100644 --- a/src/gitUtils.ts +++ b/src/gitUtils.ts @@ -29,8 +29,17 @@ export const push = async ( ); }; +/** + * Push new tags 1 by 1 to avoid github create event limits + */ export const pushTags = async () => { - await exec("git", ["push", "origin", "--tags"]); + const tagsOutput = await getExecOutput("git tag --contains HEAD"); + const tagsArray = tagsOutput.stdout.split("\n").filter(Boolean); + await Promise.all( + tagsArray.map(async (tag) => { + await getExecOutput(`git push origin ${tag}`); + }) + ); }; export const switchToMaybeExistingBranch = async (branch: string) => {