Revert "fix: accept nightly tags without 'v' prefix"

The missing 'v' prefix on the goreleaser-pro nightly was a release
mistake; new nightlies will keep the 'v' prefix.

This reverts commit 7673f7f.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2026-04-26 15:39:32 -03:00
parent 7673f7fb5b
commit c4183b175a
No known key found for this signature in database
3 changed files with 4 additions and 5 deletions

View file

@ -123,7 +123,7 @@ describe('getCertificateIdentity', () => {
});
it('uses nightly-pro.yml@refs/heads/main for Pro nightly tag', () => {
expect(goreleaser.getCertificateIdentity('goreleaser-pro', '2.16.0-eaeb08c50-nightly')).toEqual(
expect(goreleaser.getCertificateIdentity('goreleaser-pro', 'v2.16.0-eaeb08c50-nightly')).toEqual(
'https://github.com/goreleaser/goreleaser-pro-internal/.github/workflows/nightly-pro.yml@refs/heads/main'
);
});

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

View file

@ -30,9 +30,8 @@ export interface GitHubRelease {
tag_name: string;
}
// Matches the new-style nightly release tag pattern: [v]X.Y.Z-<sha>-nightly
// (the `v` prefix is optional — goreleaser-pro tags don't have it).
export const nightlyTagRegex = /^v?\d+\.\d+\.\d+-[0-9a-f]+-nightly$/i;
// Matches the new-style nightly release tag pattern: vX.Y.Z-<sha>-nightly
export const nightlyTagRegex = /^v\d+\.\d+\.\d+-[0-9a-f]+-nightly$/i;
export const isNightlyTag = (tag: string): boolean => {
return tag === 'nightly' || nightlyTagRegex.test(tag);