Missing /index.json restored

This commit is contained in:
Alex Mullans
2019-10-03 18:00:43 -07:00
parent 70528ac007
commit 2f00ce2a3e
4 changed files with 38 additions and 17 deletions

View File

@ -29,7 +29,7 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
owner = github.context.repo.owner;
}
if (feedUrl.indexOf('nuget.pkg.github.com') > -1) {
sourceUrl = 'https://nuget.pkg.github.com/' + owner;
sourceUrl = 'https://nuget.pkg.github.com/' + owner + '/index.json';
}
if (!process.env.NUGET_AUTH_TOKEN || process.env.NUGET_AUTH_TOKEN == '') {
throw new Error('The NUGET_AUTH_TOKEN environment variable was not provided. In this step, add the following: \r\nenv:\r\n NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}');
@ -85,13 +85,13 @@ function writeFeedToFile(feedUrl, existingFileLocation, tempFileLocation) {
.up();
sourceKeys.push(keystring);
}
xml = xml
.ele('packageSourceCredentials');
xml = xml.ele('packageSourceCredentials');
sourceKeys.forEach(key => {
if (key.indexOf(' ') > -1) {
throw new Error("This action currently can't handle source names with spaces. Remove the space from your repo's NuGet.config and try again.");
}
xml = xml.ele(key)
xml = xml
.ele(key)
.ele('add', { key: 'Username', value: owner })
.up()
.ele('add', {