description:'Set up a specific version of the .NET Core CLI in the PATH and set up authentication to a private NuGet repository'
description:'Used to build and publish .NET source. Set up a specific version of the .NET Core CLI in the PATH and set up authentication to a private NuGet repository'
author:'GitHub'
branding:
icon:play
color:green
inputs:
dotnet-version:
description: 'SDK version to use. Examples:2.2.104,3.1,3.1.x'
description: 'Optional SDK version to use. If not provided, will install global.json version when available. Examples:2.2.104,3.1,3.1.x'
source-url:
description:'Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword'
owner:
description:'Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository''s owner. Only used if a GPR URL is also provided in source-url'
config-file:
description:'Optional NuGet.config location, if your NuGet.config isn''t located in the root of the repo.'
include-prerelease:
description:'Whether prerelease versions should be matched with non-exact versions (for example 5.0.0-preview.6 being matched by 5, 5.0, 5.x or 5.0.x). Defaults to false if not provided.'
console.log(`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`);
letxml;
@ -4910,8 +4925,8 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
}
xml=xml.ele('packageSourceCredentials');
sourceKeys.forEach(key=>{
if(key.indexOf(' ')>-1){
thrownewError("This action currently can't handle source names with spaces. Remove the space from your repo's NuGet.config and try again.");
if(!isValidKey(key)){
thrownewError("Source name can contain letters, numbers, and '-', '_', '.' symbols only. Please, fix source name in NuGet.config and try again.");
}
xml=xml
.ele(key)
@ -7814,14 +7829,18 @@ function run() {
core.debug('No version found, trying to find version from global.json');