mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-07-06 22:57:29 +00:00
fix: accept nightly tags without 'v' prefix
goreleaser-pro publishes nightly releases as e.g. 2.16.0-eaeb08c50-nightly (no 'v' prefix). Make the nightly tag regex tolerate either form, and split the integration tests so OSS asserts the legacy fallback while Pro asserts the new <version>-<sha>-nightly format. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+3
-2
@@ -30,8 +30,9 @@ export interface GitHubRelease {
|
||||
tag_name: string;
|
||||
}
|
||||
|
||||
// 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;
|
||||
// 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;
|
||||
|
||||
export const isNightlyTag = (tag: string): boolean => {
|
||||
return tag === 'nightly' || nightlyTagRegex.test(tag);
|
||||
|
||||
Reference in New Issue
Block a user