Skip to content

Always push tags with the github api#672

Closed
bluwy wants to merge 1 commit into
mainfrom
github-tag
Closed

Always push tags with the github api#672
bluwy wants to merge 1 commit into
mainfrom
github-tag

Conversation

@bluwy

@bluwy bluwy commented Jun 25, 2026

Copy link
Copy Markdown
Member

fix #669

@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3b4d426

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread src/github.ts
sha: context.sha,
});
} catch (err) {
// Assuming tag was manually pushed in custom publish script

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, it's pretty crucial for those tags to be created so we can create github releases properly. I know this is preexisting - but it would be great if we could only swallow specific errors here.

Comment thread src/github.ts
// Assuming tag was manually pushed in custom publish script
core.warning(`Failed to create tag ${tag}: ${(err as Error).message}`);
}
await exec("git", ["push", "origin", tag], {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, how sure are we this new flow will resolve the issue. The previous code wasn't exactly pushing all tags at once either, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm actually you might be right. I'm checking the timeline and we were pushing all git tags at once up until #391 which refactors to call them separately in parallel. After that's merged, we haven't got comments of it not working, so I guess it's fixed?

I was assuming since we push in parallel, GitHub might still detect it, and the REST API is able to workaround it. But maybe this isn't a problem now. I haven't personally tested this manually.

Comment thread src/github.ts
@@ -114,25 +114,16 @@ export class GitHub {
}

async pushTag(tag: string) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a comment here explaining why we are not using the git CLI at all here

@bluwy

bluwy commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

Looks like this was already fixed so I'm going to close this. But the suggested improvements can be done later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tags created by changeset tag don't trigger workflows with on.push.tags

2 participants