Skip to content

Commit

Permalink
Only use branch name as version if tag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Nov 7, 2023
1 parent dd6e1b4 commit 5c11a27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MonoGame.Library.BuildScripts/PackContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ public PackContext(ICakeContext context)
{
RepositoryOwner = context.EnvironmentVariable("GITHUB_REPOSITORY_OWNER");
RepositoryUrl = $"https://github.com/{context.EnvironmentVariable("GITHUB_REPOSITORY")}";
Version = context.EnvironmentVariable("GITHUB_REF_NAME");
IsTag = context.EnvironmentVariable("GITHUB_REF_TYPE") == "tag";

if (IsTag)
{
Version = context.EnvironmentVariable("GITHUB_REF_NAME");
}
}
}
}

0 comments on commit 5c11a27

Please sign in to comment.