mirror of
https://github.com/MAKS-IT-COM/maksit-core-ui.git
synced 2026-11-14 03:36:11 +01:00
Compare commits
No commits in common. "main" and "v0.1.0" have entirely different histories.
35
.github/workflows/publish-nuget.yml
vendored
35
.github/workflows/publish-nuget.yml
vendored
@ -1,35 +0,0 @@
|
||||
name: Publish to NuGet
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
dotnet pack src/MaksIT.Core.Desktop/MaksIT.Core.Desktop.csproj -c Release -o artifacts
|
||||
dotnet pack src/MaksIT.Core.UI/MaksIT.Core.UI.csproj -c Release -o artifacts
|
||||
|
||||
- name: NuGet login (OIDC)
|
||||
id: login
|
||||
uses: NuGet/login@v1
|
||||
with:
|
||||
user: maks-it
|
||||
|
||||
- name: Push to NuGet
|
||||
run: dotnet nuget push artifacts/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
11
CHANGELOG.md
11
CHANGELOG.md
@ -7,17 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.1] - 2026-10-27
|
||||
|
||||
### Changed
|
||||
|
||||
- **MaksIT.Core.UI:** Avalonia and Avalonia.Desktop 12.1.2 → 12.1.4.
|
||||
- Release packs both libraries for the GitHub release; nuget.org publish uses GitHub Actions Trusted Publishing instead of local `DotNetNuGet`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Sync RepoUtils release engine (`-InstallOnly` / Helm install helpers) and bump test packages (xunit.v3, coverlet.MTP).
|
||||
|
||||
## [0.1.0] - 2026-10-10
|
||||
|
||||
### Added
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# MaksIT.Core desktop UI
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
Shared .NET 10 libraries for MaksIT desktop apps. Install from NuGet. Do not reference this folder from another repository.
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.MTP" Version="10.1.0" />
|
||||
<PackageReference Include="xunit.v3" Version="4.0.2" />
|
||||
<PackageReference Include="coverlet.MTP" Version="10.0.1" />
|
||||
<PackageReference Include="xunit.v3" Version="4.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
|
||||
<PackageId>MaksIT.Core.Desktop</PackageId>
|
||||
<Version>0.1.1</Version>
|
||||
<Version>0.1.0</Version>
|
||||
<Authors>Maksym Sadovnychyy</Authors>
|
||||
<Company>MAKS-IT</Company>
|
||||
<Product>MaksIT.Core.Desktop</Product>
|
||||
|
||||
@ -11,8 +11,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.MTP" Version="10.1.0" />
|
||||
<PackageReference Include="xunit.v3" Version="4.0.2" />
|
||||
<PackageReference Include="coverlet.MTP" Version="10.0.1" />
|
||||
<PackageReference Include="xunit.v3" Version="4.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
|
||||
<PackageId>MaksIT.Core.UI</PackageId>
|
||||
<Version>0.1.1</Version>
|
||||
<Version>0.1.0</Version>
|
||||
<Authors>Maksym Sadovnychyy</Authors>
|
||||
<Company>MAKS-IT</Company>
|
||||
<Product>MaksIT.Core.UI</Product>
|
||||
@ -43,8 +43,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="12.1.4" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="12.1.4" />
|
||||
<PackageReference Include="Avalonia" Version="12.1.2" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="12.1.2" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -8,10 +8,6 @@
|
||||
.NOTES
|
||||
Per-plugin dryRun on mutatesRemote plugins validates without remote mutation.
|
||||
There is no engine-wide dryRun switch — set dryRun on each plugin as needed.
|
||||
|
||||
-InstallOnly (Install-Helm-*.bat) keeps the version plugin and HelmSelfDeploy.
|
||||
Compile, test, image build, image push, and HelmPush are skipped. The chart
|
||||
must already be in OCI at the version the version plugin reports.
|
||||
#>
|
||||
|
||||
# Keep a plain param block so unbound launcher arguments remain in $args for
|
||||
@ -21,17 +17,6 @@ param()
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-Location $PSScriptRoot
|
||||
|
||||
$installOnly = $false
|
||||
$extensionArgs = [System.Collections.Generic.List[object]]::new()
|
||||
foreach ($argument in @($args)) {
|
||||
if ([string]$argument -eq '-InstallOnly') {
|
||||
$installOnly = $true
|
||||
continue
|
||||
}
|
||||
|
||||
$extensionArgs.Add($argument)
|
||||
}
|
||||
|
||||
$srcDir = (Resolve-Path (Join-Path $PSScriptRoot '..\..')).Path
|
||||
|
||||
. (Join-Path $srcDir 'modules/Engine/Import-EngineModules.ps1')
|
||||
@ -39,7 +24,7 @@ Import-EngineModules -Engine Release
|
||||
|
||||
$releaseExtension = $null
|
||||
if (Get-Command Initialize-ReleaseExtension -ErrorAction SilentlyContinue) {
|
||||
$releaseExtension = Initialize-ReleaseExtension -ScriptDir $PSScriptRoot -ArgumentList @($extensionArgs)
|
||||
$releaseExtension = Initialize-ReleaseExtension -ScriptDir $PSScriptRoot -ArgumentList $args
|
||||
}
|
||||
|
||||
$settings = if ($null -ne $releaseExtension) {
|
||||
@ -50,29 +35,9 @@ else {
|
||||
}
|
||||
|
||||
$configuredPlugins = Get-ConfiguredPlugins -Settings $settings
|
||||
if ($installOnly) {
|
||||
$enabledBefore = @($configuredPlugins | Where-Object { $_.enabled } | ForEach-Object { [string]$_.name })
|
||||
$configuredPlugins = @(Select-HelmInstallPlugins -Plugins $configuredPlugins -ScriptDir $PSScriptRoot)
|
||||
$kept = @($configuredPlugins | ForEach-Object { [string]$_.name })
|
||||
$skipped = @($enabledBefore | Where-Object { $_ -notin $kept })
|
||||
if ($skipped.Count -gt 0) {
|
||||
Write-Log -Level 'INFO' -Message "Install-only: skipping $($skipped -join ', '). Chart and images are taken from OCI."
|
||||
}
|
||||
|
||||
Write-Log -Level 'INFO' -Message "Install-only: running $($kept -join ', ')."
|
||||
}
|
||||
|
||||
Initialize-RepoUtilsVaultSecrets -Settings $settings -Plugins $configuredPlugins
|
||||
|
||||
$releaseBanner = if ($installOnly) {
|
||||
$modeLabel = 'ha'
|
||||
if ($null -ne $releaseExtension -and $releaseExtension.ContextData.PSObject.Properties.Name -contains 'deployMode') {
|
||||
$modeLabel = [string]$releaseExtension.ContextData.deployMode
|
||||
}
|
||||
|
||||
"HELM INSTALL (deploy mode: $modeLabel; OCI chart, no build or push)"
|
||||
}
|
||||
elseif ($null -ne $releaseExtension) {
|
||||
$releaseBanner = if ($null -ne $releaseExtension) {
|
||||
$releaseExtension.StepBanner
|
||||
}
|
||||
else {
|
||||
@ -132,11 +97,7 @@ if (-not $releaseStageInitialized) {
|
||||
|
||||
Write-Log -Level 'OK' -Message '=================================================='
|
||||
if ($releaseHadPluginFailures) {
|
||||
$failureLabel = if ($installOnly) { 'HELM INSTALL FAILED' } else { 'RELEASE FAILED' }
|
||||
Write-Log -Level 'ERROR' -Message $failureLabel
|
||||
}
|
||||
elseif ($installOnly) {
|
||||
Write-Log -Level 'OK' -Message 'HELM INSTALL COMPLETE'
|
||||
Write-Log -Level 'ERROR' -Message 'RELEASE FAILED'
|
||||
}
|
||||
elseif ($engineContext.PSObject.Properties.Name -contains 'skipPublishPlugins' -and $engineContext.skipPublishPlugins) {
|
||||
Write-Log -Level 'OK' -Message 'RUN COMPLETE (publish skipped by ReleasePublishGuard)'
|
||||
@ -149,7 +110,7 @@ else {
|
||||
}
|
||||
Write-Log -Level 'OK' -Message '=================================================='
|
||||
|
||||
if (-not $installOnly -and $engineContext.isNonReleaseBranch -and -not ($engineContext.PSObject.Properties.Name -contains 'skipPublishPlugins' -and $engineContext.skipPublishPlugins)) {
|
||||
if ($engineContext.isNonReleaseBranch -and -not ($engineContext.PSObject.Properties.Name -contains 'skipPublishPlugins' -and $engineContext.skipPublishPlugins)) {
|
||||
$preferredReleaseBranch = Get-PreferredReleaseBranch -EngineContext $engineContext
|
||||
Write-Log -Level 'INFO' -Message "For publish, use an allowed branch (see ReleasePublishGuard.branches), e.g. '$preferredReleaseBranch', and satisfy the guard requirements."
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft-07/schema",
|
||||
"title": "Release Package Script Settings",
|
||||
"description": "Invoke-ReleasePackage.ps1 plugin settings. Place ReleasePublishGuard before GitHub. Publish plugins omit per-plugin branches. Semver comes from DotNetReleaseVersion (projectFiles). DotNetPack packs the first projectFiles entry only, so each library is packed for GitHub assets; nuget.org publish is GHA Trusted Publishing.",
|
||||
"description": "Invoke-ReleasePackage.ps1 plugin settings. Place ReleasePublishGuard before GitHub/DotNetNuGet. Publish plugins omit per-plugin branches. Semver comes from DotNetReleaseVersion (projectFiles). DotNetPack packs the first projectFiles entry only, so each library is packed and pushed as its own pair.",
|
||||
"repoUtilsSecretsShared": "RepoUtilsSecretsShared",
|
||||
"repoUtilsSecrets": "RepoUtilsSecrets",
|
||||
"plugins": [
|
||||
@ -47,6 +47,13 @@
|
||||
],
|
||||
"artifactsDir": "..\\..\\..\\releases"
|
||||
},
|
||||
{
|
||||
"name": "DotNetNuGet",
|
||||
"stageLabel": "release",
|
||||
"enabled": true,
|
||||
"nugetSecret": "NuGet",
|
||||
"source": "https://api.nuget.org/v3/index.json"
|
||||
},
|
||||
{
|
||||
"name": "DotNetPack",
|
||||
"stageLabel": "build",
|
||||
@ -56,6 +63,13 @@
|
||||
],
|
||||
"artifactsDir": "..\\..\\..\\releases"
|
||||
},
|
||||
{
|
||||
"name": "DotNetNuGet",
|
||||
"stageLabel": "release",
|
||||
"enabled": true,
|
||||
"nugetSecret": "NuGet",
|
||||
"source": "https://api.nuget.org/v3/index.json"
|
||||
},
|
||||
{
|
||||
"name": "AttachNuGetPackages",
|
||||
"stageLabel": "release",
|
||||
|
||||
@ -266,61 +266,4 @@ function Get-PreferredReleaseBranch {
|
||||
return "main"
|
||||
}
|
||||
|
||||
function Select-HelmInstallPlugins {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Keeps the release version plugin and HelmSelfDeploy for an OCI install without build or push.
|
||||
|
||||
.DESCRIPTION
|
||||
Install-Helm-*.bat passes -InstallOnly. The chart and images are already in OCI, so compile,
|
||||
test, image build, image push, and HelmPush are not run. The version plugin still supplies
|
||||
the chart tag (shared.version). HelmSelfDeploy dryRun is rejected: that path needs the local
|
||||
package HelmPush keeps in the same run.
|
||||
#>
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[AllowEmptyCollection()]
|
||||
[object[]]$Plugins,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$ScriptDir
|
||||
)
|
||||
|
||||
$versionPlugins = @(Get-EnabledVersionPlugins -Plugins $Plugins -ScriptDir $ScriptDir)
|
||||
if ($versionPlugins.Count -eq 0) {
|
||||
throw "Install-only Helm requires exactly one enabled release version plugin (providesVersion) so the OCI chart tag can be resolved. Build and push plugins are not run."
|
||||
}
|
||||
|
||||
if ($versionPlugins.Count -gt 1) {
|
||||
$names = ($versionPlugins | ForEach-Object { [string]$_.name }) -join ', '
|
||||
throw "Install-only Helm requires exactly one enabled release version plugin. Found: $names."
|
||||
}
|
||||
|
||||
$deployPlugins = @($Plugins | Where-Object {
|
||||
$null -ne $_ -and
|
||||
$_.enabled -and
|
||||
[string]$_.name -eq 'HelmSelfDeploy'
|
||||
})
|
||||
|
||||
if ($deployPlugins.Count -eq 0) {
|
||||
throw "Install-only Helm requires an enabled HelmSelfDeploy plugin. The chart is installed from OCI; image build, image push, and HelmPush are not run."
|
||||
}
|
||||
|
||||
if ($deployPlugins.Count -gt 1) {
|
||||
throw "Install-only Helm found multiple enabled HelmSelfDeploy plugins."
|
||||
}
|
||||
|
||||
$deployPlugin = $deployPlugins[0]
|
||||
if ($deployPlugin.PSObject.Properties.Name -contains 'dryRun' -and $null -ne $deployPlugin.dryRun -and [bool]$deployPlugin.dryRun) {
|
||||
throw "Install-only Helm cannot use HelmSelfDeploy dryRun. That path needs the local package from HelmPush in the same run. Omit dryRun to install the chart already published to OCI."
|
||||
}
|
||||
|
||||
$versionName = [string]$versionPlugins[0].name
|
||||
return @($Plugins | Where-Object {
|
||||
$null -ne $_ -and
|
||||
$_.enabled -and
|
||||
([string]$_.name -eq $versionName -or [string]$_.name -eq 'HelmSelfDeploy')
|
||||
})
|
||||
}
|
||||
|
||||
Export-ModuleMember -Function Assert-WorkingTreeClean, Initialize-ReleaseStageContext, New-EngineContext, Get-PreferredReleaseBranch, Select-HelmInstallPlugins
|
||||
Export-ModuleMember -Function Assert-WorkingTreeClean, Initialize-ReleaseStageContext, New-EngineContext, Get-PreferredReleaseBranch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user