-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.releaserc.js
More file actions
41 lines (34 loc) · 1.09 KB
/
.releaserc.js
File metadata and controls
41 lines (34 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//@ts-check
import {
GithubNugetRegistryInfo,
MSBuildProject,
NugetRegistryInfo
} from '@halospv3/hce.shared-config/dotnet';
import { getConfig } from '@halospv3/hce.shared-config/semanticReleaseConfigDotnet';
import { inspect } from 'node:util';
/** @type {import('semantic-release').Options} */
let config = {};
try {
/** @type {MSBuildProject[]} */
const projectsToPublish = await MSBuildProject.PackableProjectsToMSBuildProjects([
'./GroupBox.Avalonia/GroupBox.Avalonia.csproj',
'./GroupBox.Avalonia.Sample/GroupBox.Avalonia.Sample.csproj'
]).then(promises => Promise.all(promises));
const mainProject = projectsToPublish[0];
if (!mainProject)
throw new Error('GroupBox.Avalonia.csproj was not in the evaluated projects array!');
const opts = { project: mainProject };
config = await getConfig(
projectsToPublish,
[
new GithubNugetRegistryInfo(opts),
new NugetRegistryInfo(opts),
]
);
}
catch (error) {
console.error(inspect(error, { depth: Infinity }));
throw error;
}
console.log(inspect(config, { depth: Infinity }));
export default config;