Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions Build/Test-ReleaseConfiguration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ if (@($release.Module.ArtifactPaths | Where-Object { $_ -like '*EventViewerX.Cli
$moduleRelease = Get-Content -LiteralPath `
(Join-Path $RepositoryRoot 'Build\release.module.json') -Raw |
ConvertFrom-Json
if ($null -ne $moduleRelease.Tools -or $null -ne $moduleRelease.GitHub) {
throw 'The module release must not include CLI tools or a unified GitHub release.'
if ($null -ne $moduleRelease.Tools -or
$moduleRelease.GitHub.Publish -ne $true -or
[string]::IsNullOrWhiteSpace([string] $moduleRelease.GitHub.TokenFilePath) -or
$moduleRelease.GitHub.TokenEnvName -ne 'GITHUB_TOKEN' -or
$moduleRelease.GitHub.GenerateReleaseNotes -ne $true -or
$moduleRelease.GitHub.TagTemplate -ne 'PSEventViewer-v{Version}') {
throw 'The module release must publish signed artifacts to GitHub with generated notes and no CLI tools.'
}
if ($moduleRelease.Module.IncludesPackages -ne $true -or
[string] $moduleRelease.Module.ConfigPath -ne 'Build/module.json') {
Expand Down Expand Up @@ -132,16 +137,17 @@ if ([System.IO.Path]::IsPathRooted($galleryKeyPath) -or
[array] $legacyGitHubSegments = @($moduleBuild.Segments | Where-Object {
$_.Type -eq 'GitHubNuget'
})
if (@($legacyGitHubSegments | Where-Object {
$_.Configuration.Enabled -eq $true -or
-not [string]::IsNullOrWhiteSpace([string] $_.Configuration.ApiKeyFilePath)
}).Count -ne 0) {
throw 'The legacy module GitHub lane must stay disabled and must not declare a token-file path.'
if ($legacyGitHubSegments.Count -ne 0) {
throw 'The legacy module GitHub lane must be absent; the release coordinator owns GitHub publication.'
}
[array] $publishOrder = @($moduleBuild.Segments | Where-Object { $_.Type -eq 'Release' } |
ForEach-Object { $_.Configuration.PublishOrder })
if (($publishOrder -join ',') -ne 'NuGet,PowerShellGallery') {
throw 'The module pipeline must publish only to NuGet and PowerShell Gallery.'
}

[pscustomobject] @{
NuGetCredential = $nuGetKeyPath
GitHubCredential = 'GITHUB_TOKEN'
GitHubCredential = 'TokenFilePath or GITHUB_TOKEN'
PowerShellGalleryCredential = $galleryKeyPath
LocalRuntimeAndOutputExcluded = $true
CliStagingIsolated = $true
Expand Down
4 changes: 2 additions & 2 deletions Build/Test-ReleasePlans.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if (@($modulePlan.ModuleAssets | Where-Object { $_ -like '*EventViewerX.Cli.*.nu
throw 'The module/package release plan must exclude the EventViewerX.Cli .NET tool package.'
}
if ($null -ne $modulePlan.DotNetToolPlan -or
$modulePlan.ModulePlan.UnifiedGitHubRelease -eq $true) {
throw 'The module/package release plan must exclude standalone CLI and unified GitHub publication.'
$modulePlan.ModulePlan.UnifiedGitHubRelease -ne $true) {
throw 'The module/package release plan must include GitHub publication without standalone CLI assets.'
}

$fullPlan = & $buildAllPath -RunMode Plan
Expand Down
24 changes: 1 addition & 23 deletions Build/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@
],
"PublishOrder": [
"NuGet",
"PowerShellGallery",
"GitHub"
"PowerShellGallery"
]
}
},
Expand Down Expand Up @@ -404,27 +403,6 @@
},
"Type": "GalleryNuget"
},
{
"Configuration": {
"Destination": "GitHub",
"Tool": "Auto",
"ApiKey": "",
"Enabled": false,
"UserName": "EvotecIT",
"RepositoryName": "EventViewerX",
"Force": false,
"OverwriteTagName": "{ModuleName}-v{ModuleVersionWithPreRelease}",
"DoNotMarkAsPreRelease": false,
"GenerateReleaseNotes": true,
"ReuseExistingRelease": false,
"ReplaceExistingAssets": false,
"UseAsDependencyVersionSource": false,
"PublishRequiredModules": false,
"RequiredModuleSourceRepository": "PSGallery",
"Verbose": false
},
"Type": "GitHubNuget"
},
{
"Type": "Gate",
"Configuration": {
Expand Down
14 changes: 14 additions & 0 deletions Build/release.module.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,19 @@
"TimeoutSeconds": 1800
}
]
},
"GitHub": {
"Publish": true,
"VersionSource": "Module",
"Owner": "EvotecIT",
"Repository": "EventViewerX",
"TokenFilePath": "C:\\Support\\Important\\GithubAPI.txt",
"TokenEnvName": "GITHUB_TOKEN",
"GenerateReleaseNotes": true,
"IsPreRelease": false,
"ReuseExistingRelease": false,
"ReplaceExistingAssets": false,
"TagTemplate": "PSEventViewer-v{Version}",
"ReleaseNameTemplate": "EventViewerX / PSEventViewer {Version}"
}
}
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

High-performance Windows Event Log tooling for .NET and PowerShell.

> **Release state:** PSEventViewer 4.0.0 is available on PowerShell Gallery,
> and the five EventViewerX 4.0.0 libraries are available on NuGet. The
> **Release state:** PSEventViewer 4.0.1 is available on PowerShell Gallery,
> and the five EventViewerX 4.0.1 libraries are available on NuGet. The
> `EventViewerX.Cli` .NET tool and platform ZIPs have not been published.
> CLI examples below describe the source-built command until that release lane
> is available.
Expand Down Expand Up @@ -1196,7 +1196,8 @@ Install or update PSPublishModule to the latest version before running the relea
.\Build\Build-Module.ps1 -RunMode Build

# Resolve the configured 4.0.X version, publish the EventViewerX libraries to
# NuGet, and publish PSEventViewer to PowerShell Gallery.
# NuGet and PSEventViewer to PowerShell Gallery, then create a GitHub release
# with the signed packages, module archive, and generated release notes.
.\Build\Build-Module.ps1 -RunMode Publish

# Build the standalone CLI archives locally. This command does not upload them.
Expand Down
32 changes: 16 additions & 16 deletions Sources/PSEventViewer/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@
"eventviewerx.detection": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"JsonSchema.Net": "[9.4.0, )",
"System.Text.Json": "[10.0.11, )",
"YamlDotNet": "[18.1.0, )"
Expand All @@ -437,14 +437,14 @@
"eventviewerx.evtx": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"evtx": "[1.5.2, )"
}
},
"eventviewerx.reporting": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"HtmlForgeX": "[0.56.0, )",
"HtmlForgeX.Email": "[1.6.0, )",
"Microsoft.Bcl.AsyncInterfaces": "[10.0.11, )",
Expand All @@ -456,7 +456,7 @@
"type": "Project",
"dependencies": {
"DBAClientX.SQLite": "[1.0.8, )",
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"Microsoft.Bcl.AsyncInterfaces": "[10.0.11, )"
}
}
Expand Down Expand Up @@ -892,22 +892,22 @@
"eventviewerx.detection": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"JsonSchema.Net": "[9.4.0, )",
"YamlDotNet": "[18.1.0, )"
}
},
"eventviewerx.evtx": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"evtx": "[1.5.2, )"
}
},
"eventviewerx.reporting": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"HtmlForgeX": "[0.56.0, )",
"HtmlForgeX.Email": "[1.6.0, )",
"OfficeIMO.CSV": "[3.2.4, )",
Expand All @@ -918,7 +918,7 @@
"type": "Project",
"dependencies": {
"DBAClientX.SQLite": "[1.0.8, )",
"EventViewerX": "[4.0.0, )"
"EventViewerX": "[4.0.1, )"
}
}
},
Expand Down Expand Up @@ -1200,22 +1200,22 @@
"eventviewerx.detection": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"JsonSchema.Net": "[9.4.0, )",
"YamlDotNet": "[18.1.0, )"
}
},
"eventviewerx.evtx": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"evtx": "[1.5.2, )"
}
},
"eventviewerx.reporting": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"HtmlForgeX": "[0.56.0, )",
"HtmlForgeX.Email": "[1.6.0, )",
"OfficeIMO.CSV": "[3.2.4, )",
Expand All @@ -1226,7 +1226,7 @@
"type": "Project",
"dependencies": {
"DBAClientX.SQLite": "[1.0.8, )",
"EventViewerX": "[4.0.0, )"
"EventViewerX": "[4.0.1, )"
}
}
},
Expand Down Expand Up @@ -1502,22 +1502,22 @@
"eventviewerx.detection": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"JsonSchema.Net": "[9.4.0, )",
"YamlDotNet": "[18.1.0, )"
}
},
"eventviewerx.evtx": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"evtx": "[1.5.2, )"
}
},
"eventviewerx.reporting": {
"type": "Project",
"dependencies": {
"EventViewerX": "[4.0.0, )",
"EventViewerX": "[4.0.1, )",
"HtmlForgeX": "[0.56.0, )",
"HtmlForgeX.Email": "[1.6.0, )",
"OfficeIMO.CSV": "[3.2.4, )",
Expand All @@ -1528,7 +1528,7 @@
"type": "Project",
"dependencies": {
"DBAClientX.SQLite": "[1.0.8, )",
"EventViewerX": "[4.0.0, )"
"EventViewerX": "[4.0.1, )"
}
}
},
Expand Down
Loading