Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/release-scripts/tag-and-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ const createGithubRelease = async (repo: string, tagName: `v${string}`) => {
console.info(`Creating Github release...`);
const goRes = await go(createRelease, { totalTimeoutMs: 15_000 });
if (!goRes.success) {
// We don't want to fail CI if the release fails to create. This can be done manually through Github's UI
console.info(`Unable to create Github release`);
console.info(goRes.error.message);
return null;
throw goRes.error;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Actually, now that I think about it - it's possible projects would not want to use the GH_ACCESS_TOKEN at all. I think for those it makes sense to use the previous behaviour.

I think a better way would be check whether the token exists and if yes (and the release failed) throw. Otherwise, just print the message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's still this check above which I kept in:

  if (!process.env.GH_ACCESS_TOKEN) {
    console.info(`GH_ACCESS_TOKEN not set. Skipping release creation`);
    return null;
  }

}
return goRes.data;
};
Expand Down