Skip to content

Commit

Permalink
chore(repo): only valid latest publish when not local (#22131)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1d6e0f8)
  • Loading branch information
JamesHenry authored and FrozenPandaz committed Mar 8, 2024
1 parent f20a51c commit d0ece91
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions scripts/nx-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,6 @@ const VALID_AUTHORS_FOR_LATEST = [
});

const distTag = determineDistTag(options.version);
if (!distTag || distTag === 'latest') {
// We are only expecting latest releases to be performed within publish.yml on GitHub
const author = process.env.GITHUB_ACTOR ?? '';
if (!VALID_AUTHORS_FOR_LATEST.includes(author)) {
throw new Error(
`The GitHub user "${author}" is not allowed to publish to "latest". Please request one of the following users to carry out the release: ${VALID_AUTHORS_FOR_LATEST.join(
', '
)}`
);
}
}

if (options.dryRun) {
console.warn('Not Publishing because --dryRun was passed');
Expand Down

0 comments on commit d0ece91

Please sign in to comment.