Compare commits

..

2 Commits

Author SHA1 Message Date
8bcd8d8b49 linter fixes 2025-01-02 00:13:37 +00:00
0b32034241 Remove CDN fallback logic (v2) 2025-01-02 00:11:57 +00:00
8 changed files with 2350 additions and 2317 deletions

View File

@ -227,7 +227,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
env: env:
https_proxy: http://no-such-proxy:3128 https_proxy: http://no-such-proxy:3128
no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@ -1,340 +1,336 @@
import io = require('@actions/io'); import io = require('@actions/io');
import fs = require('fs'); import fs = require('fs');
import path = require('path'); import path = require('path');
const fakeSourcesDirForTesting = path.join( const fakeSourcesDirForTesting = path.join(
__dirname, __dirname,
'runner', 'runner',
path.join( path.join(Math.random().toString(36).substring(7)),
Math.random() 's'
.toString(36) );
.substring(7)
), const invalidNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>`;
's'
); const emptyNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
<configuration>
const invalidNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>`; </configuration>`;
const emptyNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> const nugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
</configuration>`; <packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
const nugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> </packageSources>
<configuration> </configuration>`;
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> const gprnugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
</packageSources> <configuration>
</configuration>`; <packageSources>
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
const gprnugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<configuration> </packageSources>
<packageSources> </configuration>`;
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> const gprNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
</packageSources> <configuration>
</configuration>`; <packageSources>
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
const gprNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> </packageSources>
<configuration> </configuration>`;
<packageSources>
<add key="GPR" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" /> const twogprNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
</packageSources> <configuration>
</configuration>`; <packageSources>
<add key="GPR-GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
const twogprNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> <add key="GPR-Actions" value="https://nuget.pkg.github.com/actions/index.json" protocolVersion="3" />
<configuration> </packageSources>
<packageSources> </configuration>`;
<add key="GPR-GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
<add key="GPR-Actions" value="https://nuget.pkg.github.com/actions/index.json" protocolVersion="3" /> const spaceNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
</packageSources> <configuration>
</configuration>`; <packageSources>
<add key="GPR GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" />
const spaceNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> </packageSources>
<configuration> </configuration>`;
<packageSources>
<add key="GPR GitHub" value="https://nuget.pkg.github.com/OwnerName/index.json" protocolVersion="3" /> const azureartifactsNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
</packageSources> <configuration>
</configuration>`; <packageSources>
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" />
const azureartifactsNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> </packageSources>
<configuration> </configuration>`;
<packageSources>
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" /> const azureartifactsnugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?>
</packageSources> <configuration>
</configuration>`; <packageSources>
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" />
const azureartifactsnugetorgNuGetConfig: string = `<?xml version="1.0" encoding="utf-8"?> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<configuration> </packageSources>
<packageSources> </configuration>`;
<add key="AzureArtifacts" value="https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json" protocolVersion="3" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> // We want a NuGet.config one level above the sources directory, so it doesn't trample a user's NuGet.config but is still picked up by NuGet/dotnet.
</packageSources> const nugetConfigFile = path.join(fakeSourcesDirForTesting, '../nuget.config');
</configuration>`;
process.env['GITHUB_REPOSITORY'] = 'OwnerName/repo';
// We want a NuGet.config one level above the sources directory, so it doesn't trample a user's NuGet.config but is still picked up by NuGet/dotnet. import * as auth from '../src/authutil';
const nugetConfigFile = path.join(fakeSourcesDirForTesting, '../nuget.config');
describe('authutil tests', () => {
process.env['GITHUB_REPOSITORY'] = 'OwnerName/repo'; beforeEach(async () => {
import * as auth from '../src/authutil'; await io.rmRF(fakeSourcesDirForTesting);
await io.mkdirP(fakeSourcesDirForTesting);
describe('authutil tests', () => { }, 30000);
beforeEach(async () => {
await io.rmRF(fakeSourcesDirForTesting); afterAll(async () => {
await io.mkdirP(fakeSourcesDirForTesting); await io.rmRF(fakeSourcesDirForTesting);
}, 30000); }, 30000);
afterAll(async () => { beforeEach(() => {
await io.rmRF(fakeSourcesDirForTesting); if (fs.existsSync(nugetConfigFile)) {
}, 30000); fs.unlinkSync(nugetConfigFile);
}
beforeEach(() => { process.env['INPUT_OWNER'] = '';
if (fs.existsSync(nugetConfigFile)) { process.env['NUGET_AUTH_TOKEN'] = '';
fs.unlinkSync(nugetConfigFile); });
}
process.env['INPUT_OWNER'] = ''; it('No existing config, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
process.env['NUGET_AUTH_TOKEN'] = ''; process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); await auth.configAuthentication(
'https://nuget.pkg.github.com/OwnerName/index.json',
it('No existing config, sets up a full NuGet.config with URL and user/PAT for GPR', async () => { '',
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('No existing config, auth token environment variable not provided, throws', async () => {
).toMatchSnapshot(); let thrown = false;
}); try {
await auth.configAuthentication(
it('No existing config, auth token environment variable not provided, throws', async () => { 'https://nuget.pkg.github.com/OwnerName/index.json',
let thrown = false; '',
try { fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', } catch {
'', thrown = true;
fakeSourcesDirForTesting }
); expect(thrown).toBe(true);
} catch { });
thrown = true;
} it('No existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR', async () => {
expect(thrown).toBe(true); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); process.env['INPUT_OWNER'] = 'otherorg';
await auth.configAuthentication(
it('No existing config, sets up a full NuGet.config with URL and other owner/PAT for GPR', async () => { 'https://nuget.pkg.github.com/otherorg/index.json',
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; '',
process.env['INPUT_OWNER'] = 'otherorg'; fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/otherorg/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config (invalid), tries to parse an invalid NuGet.config and throws', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config (invalid), tries to parse an invalid NuGet.config and throws', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, invalidNuGetConfig);
fakeSourcesDirForTesting, let thrown = false;
'nuget.config' try {
); await auth.configAuthentication(
fs.writeFileSync(inputNuGetConfigPath, invalidNuGetConfig); 'https://nuget.pkg.github.com/OwnerName/index.json',
let thrown = false; '',
try { fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', } catch {
'', thrown = true;
fakeSourcesDirForTesting }
); expect(thrown).toBe(true);
} catch { });
thrown = true;
} it('Existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
expect(thrown).toBe(true); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ no sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, emptyNuGetConfig);
fakeSourcesDirForTesting, await auth.configAuthentication(
'nuget.config' 'https://nuget.pkg.github.com/OwnerName/index.json',
); '',
fs.writeFileSync(inputNuGetConfigPath, emptyNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ no GPR sources, sets up a full NuGet.config with URL and user/PAT for GPR', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, nugetorgNuGetConfig);
fakeSourcesDirForTesting, await auth.configAuthentication(
'nuget.config' 'https://nuget.pkg.github.com/OwnerName/index.json',
); '',
fs.writeFileSync(inputNuGetConfigPath, nugetorgNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ only GPR source, sets up a partial NuGet.config user/PAT for GPR', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig);
fakeSourcesDirForTesting, await auth.configAuthentication(
'nuget.config' 'https://nuget.pkg.github.com/OwnerName/index.json',
); '',
fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ GPR source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, gprnugetorgNuGetConfig);
fakeSourcesDirForTesting, await auth.configAuthentication(
'nuget.config' 'https://nuget.pkg.github.com/OwnerName/index.json',
); '',
fs.writeFileSync(inputNuGetConfigPath, gprnugetorgNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ two GPR sources, sets up a partial NuGet.config user/PAT for GPR', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, twogprNuGetConfig);
fakeSourcesDirForTesting, await auth.configAuthentication(
'nuget.config' 'https://nuget.pkg.github.com',
); '',
fs.writeFileSync(inputNuGetConfigPath, twogprNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config w/ spaces in key, throws for now', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ spaces in key, throws for now', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, spaceNuGetConfig);
fakeSourcesDirForTesting, let thrown = false;
'nuget.config' try {
); await auth.configAuthentication(
fs.writeFileSync(inputNuGetConfigPath, spaceNuGetConfig); 'https://nuget.pkg.github.com/OwnerName/index.json',
let thrown = false; '',
try { fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', } catch {
'', thrown = true;
fakeSourcesDirForTesting }
); expect(thrown).toBe(true);
} catch { });
thrown = true;
} it('Existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR', async () => {
expect(thrown).toBe(true); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigDirectory: string = path.join(
fakeSourcesDirForTesting,
it('Existing config not in repo root, sets up a partial NuGet.config user/PAT for GPR', async () => { 'subfolder'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigDirectory: string = path.join( const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting, inputNuGetConfigDirectory,
'subfolder' 'nuget.config'
); );
const inputNuGetConfigPath: string = path.join( fs.mkdirSync(inputNuGetConfigDirectory, {recursive: true});
inputNuGetConfigDirectory, fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig);
'nuget.config' await auth.configAuthentication(
); 'https://nuget.pkg.github.com/OwnerName/index.json',
fs.mkdirSync(inputNuGetConfigDirectory, {recursive: true}); 'subfolder/nuget.config',
fs.writeFileSync(inputNuGetConfigPath, gprNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://nuget.pkg.github.com/OwnerName/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'subfolder/nuget.config', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ only Azure Artifacts source, sets up a partial NuGet.config user/PAT for GPR', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, azureartifactsNuGetConfig);
fakeSourcesDirForTesting, await auth.configAuthentication(
'nuget.config' 'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
); '',
fs.writeFileSync(inputNuGetConfigPath, azureartifactsNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('Existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); const inputNuGetConfigPath: string = path.join(
fakeSourcesDirForTesting,
it('Existing config w/ Azure Artifacts source and NuGet.org, sets up a partial NuGet.config user/PAT for GPR', async () => { 'nuget.config'
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; );
const inputNuGetConfigPath: string = path.join( fs.writeFileSync(inputNuGetConfigPath, azureartifactsnugetorgNuGetConfig);
fakeSourcesDirForTesting, await auth.configAuthentication(
'nuget.config' 'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
); '',
fs.writeFileSync(inputNuGetConfigPath, azureartifactsnugetorgNuGetConfig); fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect(
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'}) it('No existing config, sets up a full NuGet.config with URL and token for other source', async () => {
).toMatchSnapshot(); process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN';
}); await auth.configAuthentication(
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json',
it('No existing config, sets up a full NuGet.config with URL and token for other source', async () => { '',
process.env['NUGET_AUTH_TOKEN'] = 'TEST_FAKE_AUTH_TOKEN'; fakeSourcesDirForTesting
await auth.configAuthentication( );
'https://pkgs.dev.azure.com/amullans/_packaging/GitHubBuilds/nuget/v3/index.json', expect(fs.existsSync(nugetConfigFile)).toBe(true);
'', expect(
fakeSourcesDirForTesting fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
); ).toMatchSnapshot();
expect(fs.existsSync(nugetConfigFile)).toBe(true); });
expect( });
fs.readFileSync(nugetConfigFile, {encoding: 'utf8'})
).toMatchSnapshot();
});
});

2602
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -72,12 +72,14 @@
.PARAMETER Verbose .PARAMETER Verbose
Displays diagnostics information. Displays diagnostics information.
.PARAMETER AzureFeed .PARAMETER AzureFeed
Default: https://builds.dotnet.microsoft.com/dotnet Default: https://dotnetcli.azureedge.net/dotnet
For internal use only. For internal use only.
Allows using a different storage to download SDK archives from. Allows using a different storage to download SDK archives from.
This parameter is only used if $NoCdn is false.
.PARAMETER UncachedFeed .PARAMETER UncachedFeed
For internal use only. For internal use only.
Allows using a different storage to download SDK archives from. Allows using a different storage to download SDK archives from.
This parameter is only used if $NoCdn is true.
.PARAMETER ProxyAddress .PARAMETER ProxyAddress
If set, the installer will use the proxy when making web requests If set, the installer will use the proxy when making web requests
.PARAMETER ProxyUseDefaultCredentials .PARAMETER ProxyUseDefaultCredentials
@ -88,6 +90,8 @@
.PARAMETER SkipNonVersionedFiles .PARAMETER SkipNonVersionedFiles
Default: false Default: false
Skips installing non-versioned files if they already exist, such as dotnet.exe. Skips installing non-versioned files if they already exist, such as dotnet.exe.
.PARAMETER NoCdn
Disable downloading from the Azure CDN, and use the uncached feed directly.
.PARAMETER JSonFile .PARAMETER JSonFile
Determines the SDK version from a user specified global.json file Determines the SDK version from a user specified global.json file
Note: global.json must have a value for 'SDK:Version' Note: global.json must have a value for 'SDK:Version'
@ -126,6 +130,7 @@ param(
[switch]$ProxyUseDefaultCredentials, [switch]$ProxyUseDefaultCredentials,
[string[]]$ProxyBypassList = @(), [string[]]$ProxyBypassList = @(),
[switch]$SkipNonVersionedFiles, [switch]$SkipNonVersionedFiles,
[switch]$NoCdn,
[int]$DownloadTimeout = 1200, [int]$DownloadTimeout = 1200,
[switch]$KeepZip, [switch]$KeepZip,
[string]$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()), [string]$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName()),
@ -1132,15 +1137,24 @@ function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $Normal
function Get-Feeds-To-Use() { function Get-Feeds-To-Use() {
$feeds = @( $feeds = @(
"https://builds.dotnet.microsoft.com/dotnet" "https://builds.dotnet.microsoft.com/dotnet"
"https://dotnetcli.azureedge.net/dotnet"
"https://ci.dot.net/public" "https://ci.dot.net/public"
"https://dotnetbuilds.azureedge.net/public"
) )
if (-not [string]::IsNullOrEmpty($AzureFeed)) { if (-not [string]::IsNullOrEmpty($AzureFeed)) {
$feeds = @($AzureFeed) $feeds = @($AzureFeed)
} }
if (-not [string]::IsNullOrEmpty($UncachedFeed)) { if ($NoCdn) {
$feeds = @(
"https://dotnetcli.blob.core.windows.net/dotnet",
"https://dotnetbuilds.blob.core.windows.net/public"
)
if (-not [string]::IsNullOrEmpty($UncachedFeed)) {
$feeds = @($UncachedFeed) $feeds = @($UncachedFeed)
}
} }
Write-Verbose "Initialized feeds: $feeds" Write-Verbose "Initialized feeds: $feeds"
@ -1385,221 +1399,221 @@ Say "Note that the script does not ensure your Windows version is supported duri
Say "To check the list of supported versions, go to https://learn.microsoft.com/dotnet/core/install/windows#supported-versions" Say "To check the list of supported versions, go to https://learn.microsoft.com/dotnet/core/install/windows#supported-versions"
Say "Installed version is $($DownloadedLink.effectiveVersion)" Say "Installed version is $($DownloadedLink.effectiveVersion)"
Say "Installation finished" Say "Installation finished"
# SIG # Begin signature block # SIG # Begin signature block
# MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAA6hOL3sfG/4jH # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAYvsOYTXPcgaBF
# iO4VqZoOTVqC+yp2rOhb1M2cc+ic7KCCDXYwggX0MIID3KADAgECAhMzAAAEBGx0 # C8M6oYBHzvQKaqKPOJVvd3P0sSBCw6CCDYUwggYDMIID66ADAgECAhMzAAAEA73V
# Bv9XKydyAAAAAAQEMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # lV0POx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2gEmAmgvWfs/mZlhi8j
# VEWgVlzhf8CeyeO7/ButBUZu8VLkH0DQraK9UKptZFKOXMELoi/oZL6IJftHp5vU # tM5Yj9606ukzuF2797CDwZiXz5JTIs1wIm5+rWuAny0azioafaOZtcaxPqnANbUf
# +sPpF3NuuXw8Z5eL9jZ7A1y+H7nMhdXP2pojHDN213VZqeoUoOZlbFl6spDF1hFP # UHnAYoZ0W6AkSnz99XrqRueh8b3Z7h2A5saVS1/MV1fjfImxH673GlexKRYORTFP
# 44Fu7TPGEwUNS213Pwln2SJ8SayeVUxsreo4pTvhDl/xZ+B7WNuLL7hatWFGrcf3 # A9XH8vCvVTIZobKSWa6y/KG4U5dkWrzJuLbT9Kr3x6yk0bO6epG09yy86HmlnmwQ
# w/HiVCoTfsY49SaN6zAK6akS3KI6KZHfzjaxDw+4LHo8gL68Ik1HZe4W1jaLYaED # bJwBedz4ZpKkvtIJ2U2PYvLti5bztm5WL/hWhDmtXBhoqKy1d/i4LDz7F4vXy9//
# LWvKIinaH2vwU0J4a+oX+64eSh0tI9Ef3aM6jn9LgqubY36TzptUTWcsM3vv3YGB # 5Wy8zHMLw4ZFwfywP8/P5pZP7nlvIrordtefS2z3Ipea0thJxwyFJSU8c7OGvPof
# Dnf7LPxSt4/s5bUgAHvkWTjESdtIbt6Pxqz4BRha+ckPYBj968t3mSh6 # uHhYKMn+Lg1tj5QcIvT7KG0JGp/XWe/CEB9ruOkYZh9VKBlEU2CkDsWeTXFy5heV
# eMPMxRC/GBHPypBHHSrd8BtUsKgehcetdsfQrOI3VLV9gx8SGr8ehSU2Rg0U2UtK
# a4S5THXp0PksrjJLmykIsvBmMgl3uK4KJbu6zh3w5ACSS/OZXzrsowysGjn2QBwb
# hoIjCDhmNLLq2gupcAhPCgqUX6Ixmg8H0SlqoRp0mZTss7ZS+ErxTQoFBbLkoX5F
# 9HjkIOcM6/0F
# SIG # End signature block # SIG # End signature block

View File

@ -1396,15 +1396,24 @@ get_feeds_to_use()
{ {
feeds=( feeds=(
"https://builds.dotnet.microsoft.com/dotnet" "https://builds.dotnet.microsoft.com/dotnet"
"https://dotnetcli.azureedge.net/dotnet"
"https://ci.dot.net/public" "https://ci.dot.net/public"
"https://dotnetbuilds.azureedge.net/public"
) )
if [[ -n "$azure_feed" ]]; then if [[ -n "$azure_feed" ]]; then
feeds=("$azure_feed") feeds=("$azure_feed")
fi fi
if [[ -n "$uncached_feed" ]]; then if [[ "$no_cdn" == "true" ]]; then
feeds=("$uncached_feed") feeds=(
"https://dotnetcli.blob.core.windows.net/dotnet"
"https://dotnetbuilds.blob.core.windows.net/public"
)
if [[ -n "$uncached_feed" ]]; then
feeds=("$uncached_feed")
fi
fi fi
} }
@ -1536,7 +1545,7 @@ generate_regular_links() {
link_types+=("legacy") link_types+=("legacy")
else else
legacy_download_link="" legacy_download_link=""
say_verbose "Could not construct a legacy_download_link; omitting..." say_verbose "Cound not construct a legacy_download_link; omitting..."
fi fi
# Check if the SDK version is already installed. # Check if the SDK version is already installed.
@ -1639,7 +1648,7 @@ install_dotnet() {
say "The resource at $link_type link '$download_link' is not available." say "The resource at $link_type link '$download_link' is not available."
;; ;;
*) *)
say "Failed to download $link_type link '$download_link': $http_code $download_error_msg" say "Failed to download $link_type link '$download_link': $download_error_msg"
;; ;;
esac esac
rm -f "$zip_path" 2>&1 && say_verbose "Temporary archive file $zip_path was removed" rm -f "$zip_path" 2>&1 && say_verbose "Temporary archive file $zip_path was removed"
@ -1700,6 +1709,7 @@ install_dir="<auto>"
architecture="<auto>" architecture="<auto>"
dry_run=false dry_run=false
no_path=false no_path=false
no_cdn=false
azure_feed="" azure_feed=""
uncached_feed="" uncached_feed=""
feed_credential="" feed_credential=""
@ -1772,6 +1782,10 @@ do
verbose=true verbose=true
non_dynamic_parameters+=" $name" non_dynamic_parameters+=" $name"
;; ;;
--no-cdn|-[Nn]o[Cc]dn)
no_cdn=true
non_dynamic_parameters+=" $name"
;;
--azure-feed|-[Aa]zure[Ff]eed) --azure-feed|-[Aa]zure[Ff]eed)
shift shift
azure_feed="$1" azure_feed="$1"
@ -1876,10 +1890,13 @@ do
echo " --verbose,-Verbose Display diagnostics information." echo " --verbose,-Verbose Display diagnostics information."
echo " --azure-feed,-AzureFeed For internal use only." echo " --azure-feed,-AzureFeed For internal use only."
echo " Allows using a different storage to download SDK archives from." echo " Allows using a different storage to download SDK archives from."
echo " This parameter is only used if --no-cdn is false."
echo " --uncached-feed,-UncachedFeed For internal use only." echo " --uncached-feed,-UncachedFeed For internal use only."
echo " Allows using a different storage to download SDK archives from." echo " Allows using a different storage to download SDK archives from."
echo " This parameter is only used if --no-cdn is true."
echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
echo " -SkipNonVersionedFiles" echo " -SkipNonVersionedFiles"
echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly."
echo " --jsonfile <JSONFILE> Determines the SDK version from a user specified global.json file." echo " --jsonfile <JSONFILE> Determines the SDK version from a user specified global.json file."
echo " Note: global.json must have a value for 'SDK:Version'" echo " Note: global.json must have a value for 'SDK:Version'"
echo " --keep-zip,-KeepZip If set, downloaded file is kept." echo " --keep-zip,-KeepZip If set, downloaded file is kept."
@ -1939,4 +1956,4 @@ fi
say "Note that the script does not resolve dependencies during installation." say "Note that the script does not resolve dependencies during installation."
say "To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the \"Dependencies\" section." say "To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the \"Dependencies\" section."
say "Installation finished successfully." say "Installation finished successfully."

View File

@ -1,155 +1,155 @@
import * as fs from 'fs'; import * as fs from 'fs';
import * as path from 'path'; import * as path from 'path';
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as github from '@actions/github'; import * as github from '@actions/github';
import * as xmlbuilder from 'xmlbuilder'; import * as xmlbuilder from 'xmlbuilder';
import * as xmlParser from 'fast-xml-parser'; import * as xmlParser from 'fast-xml-parser';
import {ProcessEnvOptions} from 'child_process'; import {ProcessEnvOptions} from 'child_process';
export function configAuthentication( export function configAuthentication(
feedUrl: string, feedUrl: string,
existingFileLocation: string = '', existingFileLocation: string = '',
processRoot: string = process.cwd() processRoot: string = process.cwd()
) { ) {
const existingNuGetConfig: string = path.resolve( const existingNuGetConfig: string = path.resolve(
processRoot, processRoot,
existingFileLocation === '' existingFileLocation === ''
? getExistingNugetConfig(processRoot) ? getExistingNugetConfig(processRoot)
: existingFileLocation : existingFileLocation
); );
const tempNuGetConfig: string = path.resolve( const tempNuGetConfig: string = path.resolve(
processRoot, processRoot,
'../', '../',
'nuget.config' 'nuget.config'
); );
writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig); writeFeedToFile(feedUrl, existingNuGetConfig, tempNuGetConfig);
} }
function isValidKey(key: string): boolean { function isValidKey(key: string): boolean {
return /^[\w\-\.]+$/i.test(key); return /^[\w\-\.]+$/i.test(key);
} }
function getExistingNugetConfig(processRoot: string) { function getExistingNugetConfig(processRoot: string) {
const defaultConfigName = 'nuget.config'; const defaultConfigName = 'nuget.config';
const configFileNames = fs const configFileNames = fs
.readdirSync(processRoot) .readdirSync(processRoot)
.filter(filename => filename.toLowerCase() === defaultConfigName); .filter(filename => filename.toLowerCase() === defaultConfigName);
if (configFileNames.length) { if (configFileNames.length) {
return configFileNames[0]; return configFileNames[0];
} }
return defaultConfigName; return defaultConfigName;
} }
function writeFeedToFile( function writeFeedToFile(
feedUrl: string, feedUrl: string,
existingFileLocation: string, existingFileLocation: string,
tempFileLocation: string tempFileLocation: string
) { ) {
console.log( console.log(
`dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}` `dotnet-auth: Finding any source references in ${existingFileLocation}, writing a new temporary configuration file with credentials to ${tempFileLocation}`
); );
let xml: xmlbuilder.XMLElement; let xml: xmlbuilder.XMLElement;
let sourceKeys: string[] = []; let sourceKeys: string[] = [];
let owner: string = core.getInput('owner'); let owner: string = core.getInput('owner');
let sourceUrl: string = feedUrl; let sourceUrl: string = feedUrl;
if (!owner) { if (!owner) {
owner = github.context.repo.owner; owner = github.context.repo.owner;
} }
if (!process.env.NUGET_AUTH_TOKEN || process.env.NUGET_AUTH_TOKEN == '') { if (!process.env.NUGET_AUTH_TOKEN || process.env.NUGET_AUTH_TOKEN == '') {
throw new Error( 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}}' '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}}'
); );
} }
if (fs.existsSync(existingFileLocation)) { if (fs.existsSync(existingFileLocation)) {
// get key from existing NuGet.config so NuGet/dotnet can match credentials // get key from existing NuGet.config so NuGet/dotnet can match credentials
const curContents: string = fs.readFileSync(existingFileLocation, 'utf8'); const curContents: string = fs.readFileSync(existingFileLocation, 'utf8');
var json = xmlParser.parse(curContents, {ignoreAttributes: false}); var json = xmlParser.parse(curContents, {ignoreAttributes: false});
if (typeof json.configuration == 'undefined') { if (typeof json.configuration == 'undefined') {
throw new Error(`The provided NuGet.config seems invalid.`); throw new Error(`The provided NuGet.config seems invalid.`);
} }
if (typeof json.configuration.packageSources != 'undefined') { if (typeof json.configuration.packageSources != 'undefined') {
if (typeof json.configuration.packageSources.add != 'undefined') { if (typeof json.configuration.packageSources.add != 'undefined') {
// file has at least one <add> // file has at least one <add>
if (typeof json.configuration.packageSources.add[0] == 'undefined') { if (typeof json.configuration.packageSources.add[0] == 'undefined') {
// file has only one <add> // file has only one <add>
if ( if (
json.configuration.packageSources.add['@_value'] json.configuration.packageSources.add['@_value']
.toLowerCase() .toLowerCase()
.includes(feedUrl.toLowerCase()) .includes(feedUrl.toLowerCase())
) { ) {
let key = json.configuration.packageSources.add['@_key']; let key = json.configuration.packageSources.add['@_key'];
sourceKeys.push(key); sourceKeys.push(key);
core.debug(`Found a URL with key ${key}`); core.debug(`Found a URL with key ${key}`);
} }
} else { } else {
// file has 2+ <add> // file has 2+ <add>
for ( for (
let i = 0; let i = 0;
i < json.configuration.packageSources.add.length; i < json.configuration.packageSources.add.length;
i++ i++
) { ) {
const source = json.configuration.packageSources.add[i]; const source = json.configuration.packageSources.add[i];
const value = source['@_value']; const value = source['@_value'];
core.debug(`source '${value}'`); core.debug(`source '${value}'`);
if (value.toLowerCase().includes(feedUrl.toLowerCase())) { if (value.toLowerCase().includes(feedUrl.toLowerCase())) {
let key = source['@_key']; let key = source['@_key'];
sourceKeys.push(key); sourceKeys.push(key);
core.debug(`Found a URL with key ${key}`); core.debug(`Found a URL with key ${key}`);
} }
} }
} }
} }
} }
} }
xml = xmlbuilder xml = xmlbuilder
.create('configuration') .create('configuration')
.ele('config') .ele('config')
.ele('add', {key: 'defaultPushSource', value: sourceUrl}) .ele('add', {key: 'defaultPushSource', value: sourceUrl})
.up() .up()
.up(); .up();
if (sourceKeys.length == 0) { if (sourceKeys.length == 0) {
let keystring = 'Source'; let keystring = 'Source';
xml = xml xml = xml
.ele('packageSources') .ele('packageSources')
.ele('add', {key: keystring, value: sourceUrl}) .ele('add', {key: keystring, value: sourceUrl})
.up() .up()
.up(); .up();
sourceKeys.push(keystring); sourceKeys.push(keystring);
} }
xml = xml.ele('packageSourceCredentials'); xml = xml.ele('packageSourceCredentials');
sourceKeys.forEach(key => { sourceKeys.forEach(key => {
if (!isValidKey(key)) { if (!isValidKey(key)) {
throw new Error( throw new Error(
"Source name can contain letters, numbers, and '-', '_', '.' symbols only. Please, fix source name in NuGet.config and try again." "Source name can contain letters, numbers, and '-', '_', '.' symbols only. Please, fix source name in NuGet.config and try again."
); );
} }
xml = xml xml = xml
.ele(key) .ele(key)
.ele('add', {key: 'Username', value: owner}) .ele('add', {key: 'Username', value: owner})
.up() .up()
.ele('add', { .ele('add', {
key: 'ClearTextPassword', key: 'ClearTextPassword',
value: process.env.NUGET_AUTH_TOKEN value: process.env.NUGET_AUTH_TOKEN
}) })
.up() .up()
.up(); .up();
}); });
// If NuGet fixes itself such that on Linux it can look for environment variables in the config file (it doesn't seem to work today), // If NuGet fixes itself such that on Linux it can look for environment variables in the config file (it doesn't seem to work today),
// use this for the value above // use this for the value above
// process.platform == 'win32' // process.platform == 'win32'
// ? '%NUGET_AUTH_TOKEN%' // ? '%NUGET_AUTH_TOKEN%'
// : '$NUGET_AUTH_TOKEN' // : '$NUGET_AUTH_TOKEN'
var output = xml.end({pretty: true}); var output = xml.end({pretty: true});
fs.writeFileSync(tempFileLocation, output); fs.writeFileSync(tempFileLocation, output);
} }

View File

@ -1,304 +1,305 @@
// Load tempDirectory before it gets wiped by tool-cache // Load tempDirectory before it gets wiped by tool-cache
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as exec from '@actions/exec'; import * as exec from '@actions/exec';
import * as io from '@actions/io'; import * as io from '@actions/io';
import hc = require('@actions/http-client'); import hc = require('@actions/http-client');
import {chmodSync} from 'fs'; import {chmodSync} from 'fs';
import * as path from 'path'; import * as path from 'path';
import {ExecOptions} from '@actions/exec/lib/interfaces'; import {ExecOptions} from '@actions/exec/lib/interfaces';
import * as semver from 'semver'; import * as semver from 'semver';
const IS_WINDOWS = process.platform === 'win32'; const IS_WINDOWS = process.platform === 'win32';
/** /**
* Represents the inputted version information * Represents the inputted version information
*/ */
export class DotNetVersionInfo { export class DotNetVersionInfo {
public inputVersion: string; public inputVersion: string;
private fullversion: string; private fullversion: string;
private isExactVersionSet: boolean = false; private isExactVersionSet: boolean = false;
constructor(version: string) { constructor(version: string) {
this.inputVersion = version; this.inputVersion = version;
// Check for exact match // Check for exact match
if (semver.valid(semver.clean(version) || '') != null) { if (semver.valid(semver.clean(version) || '') != null) {
this.fullversion = semver.clean(version) as string; this.fullversion = semver.clean(version) as string;
this.isExactVersionSet = true; this.isExactVersionSet = true;
return; return;
} }
const parts: string[] = version.split('.'); const parts: string[] = version.split('.');
if (parts.length < 2 || parts.length > 3) this.throwInvalidVersionFormat(); if (parts.length < 2 || parts.length > 3) this.throwInvalidVersionFormat();
if (parts.length == 3 && parts[2] !== 'x' && parts[2] !== '*') { if (parts.length == 3 && parts[2] !== 'x' && parts[2] !== '*') {
this.throwInvalidVersionFormat(); this.throwInvalidVersionFormat();
} }
const major = this.getVersionNumberOrThrow(parts[0]); const major = this.getVersionNumberOrThrow(parts[0]);
const minor = ['x', '*'].includes(parts[1]) const minor = ['x', '*'].includes(parts[1])
? parts[1] ? parts[1]
: this.getVersionNumberOrThrow(parts[1]); : this.getVersionNumberOrThrow(parts[1]);
this.fullversion = major + '.' + minor; this.fullversion = major + '.' + minor;
} }
private getVersionNumberOrThrow(input: string): number { private getVersionNumberOrThrow(input: string): number {
try { try {
if (!input || input.trim() === '') this.throwInvalidVersionFormat(); if (!input || input.trim() === '') this.throwInvalidVersionFormat();
let number = Number(input); let number = Number(input);
if (Number.isNaN(number) || number < 0) this.throwInvalidVersionFormat(); if (Number.isNaN(number) || number < 0) this.throwInvalidVersionFormat();
return number; return number;
} catch { } catch {
this.throwInvalidVersionFormat(); this.throwInvalidVersionFormat();
return -1; return -1;
} }
} }
private throwInvalidVersionFormat() { private throwInvalidVersionFormat() {
throw new Error( throw new Error(
'Invalid version format! Supported: 1.2.3, 1.2, 1.2.x, 1.2.*' 'Invalid version format! Supported: 1.2.3, 1.2, 1.2.x, 1.2.*'
); );
} }
/** /**
* If true exacatly one version should be resolved * If true exacatly one version should be resolved
*/ */
public isExactVersion(): boolean { public isExactVersion(): boolean {
return this.isExactVersionSet; return this.isExactVersionSet;
} }
public version(): string { public version(): string {
return this.fullversion; return this.fullversion;
} }
} }
export class DotnetCoreInstaller { export class DotnetCoreInstaller {
constructor(version: string, includePrerelease: boolean = false) { constructor(version: string, includePrerelease: boolean = false) {
this.version = version; this.version = version;
this.includePrerelease = includePrerelease; this.includePrerelease = includePrerelease;
} }
public async installDotnet() { public async installDotnet() {
let output = ''; let output = '';
let resultCode = 0; let resultCode = 0;
let calculatedVersion = await this.resolveVersion( let calculatedVersion = await this.resolveVersion(
new DotNetVersionInfo(this.version) new DotNetVersionInfo(this.version)
); );
var envVariables: {[key: string]: string} = {}; var envVariables: {[key: string]: string} = {};
for (let key in process.env) { for (let key in process.env) {
if (process.env[key]) { if (process.env[key]) {
let value: any = process.env[key]; let value: any = process.env[key];
envVariables[key] = value; envVariables[key] = value;
} }
} }
if (IS_WINDOWS) { if (IS_WINDOWS) {
let escapedScript = path let escapedScript = path
.join(__dirname, '..', 'externals', 'install-dotnet.ps1') .join(__dirname, '..', 'externals', 'install-dotnet.ps1')
.replace(/'/g, "''"); .replace(/'/g, "''");
let command = `& '${escapedScript}'`; let command = `& '${escapedScript}'`;
if (calculatedVersion) { if (calculatedVersion) {
command += ` -Version ${calculatedVersion}`; command += ` -Version ${calculatedVersion}`;
} }
if (process.env['https_proxy'] != null) { if (process.env['https_proxy'] != null) {
command += ` -ProxyAddress ${process.env['https_proxy']}`; command += ` -ProxyAddress ${process.env['https_proxy']}`;
} }
// This is not currently an option // This is not currently an option
if (process.env['no_proxy'] != null) { if (process.env['no_proxy'] != null) {
command += ` -ProxyBypassList ${process.env['no_proxy']}`; command += ` -ProxyBypassList ${process.env['no_proxy']}`;
} }
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used // process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
const powershellPath = const powershellPath =
(await io.which('pwsh', false)) || (await io.which('powershell', true)); (await io.which('pwsh', false)) || (await io.which('powershell', true));
var options: ExecOptions = { var options: ExecOptions = {
listeners: { listeners: {
stdout: (data: Buffer) => { stdout: (data: Buffer) => {
output += data.toString(); output += data.toString();
} }
}, },
env: envVariables env: envVariables
}; };
resultCode = await exec.exec( resultCode = await exec.exec(
`"${powershellPath}"`, `"${powershellPath}"`,
[ [
'-NoLogo', '-NoLogo',
'-Sta', '-Sta',
'-NoProfile', '-NoProfile',
'-NonInteractive', '-NonInteractive',
'-ExecutionPolicy', '-ExecutionPolicy',
'Unrestricted', 'Unrestricted',
'-Command', '-Command',
command command
], ],
options options
); );
} else { } else {
let escapedScript = path let escapedScript = path
.join(__dirname, '..', 'externals', 'install-dotnet.sh') .join(__dirname, '..', 'externals', 'install-dotnet.sh')
.replace(/'/g, "''"); .replace(/'/g, "''");
chmodSync(escapedScript, '777'); chmodSync(escapedScript, '777');
const scriptPath = await io.which(escapedScript, true); const scriptPath = await io.which(escapedScript, true);
let scriptArguments: string[] = []; let scriptArguments: string[] = [];
if (calculatedVersion) { if (calculatedVersion) {
scriptArguments.push('--version', calculatedVersion); scriptArguments.push('--version', calculatedVersion);
} }
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used // process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
resultCode = await exec.exec(`"${scriptPath}"`, scriptArguments, { resultCode = await exec.exec(`"${scriptPath}"`, scriptArguments, {
listeners: { listeners: {
stdout: (data: Buffer) => { stdout: (data: Buffer) => {
output += data.toString(); output += data.toString();
} }
}, },
env: envVariables env: envVariables
}); });
} }
if (resultCode != 0) { if (resultCode != 0) {
throw new Error(`Failed to install dotnet ${resultCode}. ${output}`); throw new Error(`Failed to install dotnet ${resultCode}. ${output}`);
} }
} }
static addToPath() { static addToPath() {
if (process.env['DOTNET_INSTALL_DIR']) { if (process.env['DOTNET_INSTALL_DIR']) {
core.addPath(process.env['DOTNET_INSTALL_DIR']); core.addPath(process.env['DOTNET_INSTALL_DIR']);
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']); core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
} else { } else {
if (IS_WINDOWS) { if (IS_WINDOWS) {
// This is the default set in install-dotnet.ps1 // This is the default set in install-dotnet.ps1
core.addPath( core.addPath(
path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet') path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet')
); );
core.exportVariable( core.exportVariable(
'DOTNET_ROOT', 'DOTNET_ROOT',
path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet') path.join(process.env['LocalAppData'] + '', 'Microsoft', 'dotnet')
); );
} else { } else {
// This is the default set in install-dotnet.sh // This is the default set in install-dotnet.sh
core.addPath(path.join(process.env['HOME'] + '', '.dotnet')); core.addPath(path.join(process.env['HOME'] + '', '.dotnet'));
core.exportVariable( core.exportVariable(
'DOTNET_ROOT', 'DOTNET_ROOT',
path.join(process.env['HOME'] + '', '.dotnet') path.join(process.env['HOME'] + '', '.dotnet')
); );
} }
} }
console.log(process.env['PATH']); console.log(process.env['PATH']);
} }
// versionInfo - versionInfo of the SDK/Runtime // versionInfo - versionInfo of the SDK/Runtime
async resolveVersion(versionInfo: DotNetVersionInfo): Promise<string> { async resolveVersion(versionInfo: DotNetVersionInfo): Promise<string> {
if (versionInfo.isExactVersion()) { if (versionInfo.isExactVersion()) {
return versionInfo.version(); return versionInfo.version();
} }
const httpClient = new hc.HttpClient('actions/setup-dotnet', [], { const httpClient = new hc.HttpClient('actions/setup-dotnet', [], {
allowRetries: true, allowRetries: true,
maxRetries: 3 maxRetries: 3
}); });
const releasesJsonUrl: string = await this.getReleasesJsonUrl( const releasesJsonUrl: string = await this.getReleasesJsonUrl(
httpClient, httpClient,
versionInfo.version().split('.') versionInfo.version().split('.')
); );
const releasesResponse = await httpClient.getJson<any>(releasesJsonUrl); const releasesResponse = await httpClient.getJson<any>(releasesJsonUrl);
const releasesResult = releasesResponse.result || {}; const releasesResult = releasesResponse.result || {};
let releasesInfo: any[] = releasesResult['releases']; let releasesInfo: any[] = releasesResult['releases'];
releasesInfo = releasesInfo.filter((releaseInfo: any) => { releasesInfo = releasesInfo.filter((releaseInfo: any) => {
return ( return (
semver.satisfies(releaseInfo['sdk']['version'], versionInfo.version(), { semver.satisfies(releaseInfo['sdk']['version'], versionInfo.version(), {
includePrerelease: this.includePrerelease includePrerelease: this.includePrerelease
}) || }) ||
semver.satisfies( semver.satisfies(
releaseInfo['sdk']['version-display'], releaseInfo['sdk']['version-display'],
versionInfo.version(), versionInfo.version(),
{ {
includePrerelease: this.includePrerelease includePrerelease: this.includePrerelease
} }
) )
); );
}); });
// Exclude versions that are newer than the latest if using not exact // Exclude versions that are newer than the latest if using not exact
let latestSdk: string = releasesResult['latest-sdk']; let latestSdk: string = releasesResult['latest-sdk'];
releasesInfo = releasesInfo.filter((releaseInfo: any) => releasesInfo = releasesInfo.filter((releaseInfo: any) =>
semver.lte(releaseInfo['sdk']['version'], latestSdk, { semver.lte(releaseInfo['sdk']['version'], latestSdk, {
includePrerelease: this.includePrerelease includePrerelease: this.includePrerelease
}) })
); );
// Sort for latest version // Sort for latest version
releasesInfo = releasesInfo.sort((a, b) => releasesInfo = releasesInfo.sort((a, b) =>
semver.rcompare(a['sdk']['version'], b['sdk']['version'], { semver.rcompare(a['sdk']['version'], b['sdk']['version'], {
includePrerelease: this.includePrerelease includePrerelease: this.includePrerelease
}) })
); );
if (releasesInfo.length == 0) { if (releasesInfo.length == 0) {
throw new Error( throw new Error(
`Could not find dotnet core version. Please ensure that specified version ${versionInfo.inputVersion} is valid.` `Could not find dotnet core version. Please ensure that specified version ${versionInfo.inputVersion} is valid.`
); );
} }
let release = releasesInfo[0]; let release = releasesInfo[0];
return release['sdk']['version']; return release['sdk']['version'];
} }
private async getReleasesJsonUrl( private async getReleasesJsonUrl(
httpClient: hc.HttpClient, httpClient: hc.HttpClient,
versionParts: string[] versionParts: string[]
): Promise<string> { ): Promise<string> {
const response = await httpClient.getJson<any>(DotNetCoreIndexUrl); const response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
const result = response.result || {};
let releasesInfo: any[] = result['releases-index']; const result = response.result || {};
let releasesInfo: any[] = result['releases-index'];
releasesInfo = releasesInfo.filter((info: any) => {
// channel-version is the first 2 elements of the version (e.g. 2.1), filter out versions that don't match 2.1.x. releasesInfo = releasesInfo.filter((info: any) => {
const sdkParts: string[] = info['channel-version'].split('.'); // channel-version is the first 2 elements of the version (e.g. 2.1), filter out versions that don't match 2.1.x.
if ( const sdkParts: string[] = info['channel-version'].split('.');
versionParts.length >= 2 && if (
!(versionParts[1] == 'x' || versionParts[1] == '*') versionParts.length >= 2 &&
) { !(versionParts[1] == 'x' || versionParts[1] == '*')
return versionParts[0] == sdkParts[0] && versionParts[1] == sdkParts[1]; ) {
} return versionParts[0] == sdkParts[0] && versionParts[1] == sdkParts[1];
return versionParts[0] == sdkParts[0]; }
}); return versionParts[0] == sdkParts[0];
});
if (releasesInfo.length === 0) {
throw new Error( if (releasesInfo.length === 0) {
`Could not find info for version ${versionParts.join( throw new Error(
'.' `Could not find info for version ${versionParts.join(
)} at ${DotNetCoreIndexUrl}` '.'
); )} at ${DotNetCoreIndexUrl}`
} );
}
const releaseInfo = releasesInfo[0];
if (releaseInfo['support-phase'] === 'eol') { const releaseInfo = releasesInfo[0];
core.warning( if (releaseInfo['support-phase'] === 'eol') {
`${releaseInfo['product']} ${releaseInfo['channel-version']} is no longer supported and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy.` core.warning(
); `${releaseInfo['product']} ${releaseInfo['channel-version']} is no longer supported and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy.`
} );
}
return releaseInfo['releases.json'];
} return releaseInfo['releases.json'];
}
private version: string;
private includePrerelease: boolean; private version: string;
} private includePrerelease: boolean;
}
const DotNetCoreIndexUrl: string =
'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json'; const DotNetCoreIndexUrl: string =
'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';

View File

@ -38,9 +38,8 @@ export async function run() {
} }
if (versions.length) { if (versions.length) {
const includePrerelease: boolean = core.getBooleanInput( const includePrerelease: boolean =
'include-prerelease' core.getBooleanInput('include-prerelease');
);
let dotnetInstaller!: installer.DotnetCoreInstaller; let dotnetInstaller!: installer.DotnetCoreInstaller;
for (const version of new Set<string>(versions)) { for (const version of new Set<string>(versions)) {
dotnetInstaller = new installer.DotnetCoreInstaller( dotnetInstaller = new installer.DotnetCoreInstaller(