(build): update nuget package release flow

This commit is contained in:
Maksym Sadovnychyy 2026-10-27 08:36:23 +01:00
parent f0a21b4c35
commit 93fc765c9c
2 changed files with 35 additions and 36 deletions

34
.github/workflows/publish-nuget.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Publish to NuGet
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Pack
run: |
dotnet pack src/MaksIT.Results/MaksIT.Results.csproj -c Release -o artifacts
- name: NuGet login (OIDC)
id: login
uses: NuGet/login@v1
with:
user: maks-it.com
- 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

View File

@ -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/DotNetNuGet/DockerImagePush/HelmPush/NpmPublish; use its branches and tag rules. Publish plugins omit per-plugin branches. Semver comes from DotNetReleaseVersion (projectFiles).",
"description": "Invoke-ReleasePackage.ps1 plugin settings. Place ReleasePublishGuard before GitHub/DockerImagePush/HelmPush/NpmPublish; use its branches and tag rules. Publish plugins omit per-plugin branches. Semver comes from DotNetReleaseVersion (projectFiles).",
"repoUtilsSecretsShared": "RepoUtilsSecretsShared",
"repoUtilsSecrets": "RepoUtilsSecrets",
"plugins": [
@ -68,41 +68,6 @@
"releaseNotesFile": "..\\..\\..\\CHANGELOG.md",
"releaseTitlePattern": "Release {version}"
},
{
"name": "DotNetNuGet",
"stageLabel": "release",
"enabled": true,
"nugetSecret": "NuGet",
"source": "https://api.nuget.org/v3/index.json"
},
{
"name": "NpmReleaseVersion",
"stageLabel": "build",
"enabled": false,
"packageJsonPath": "..\\..\\..\\src\\package.json",
"syncWorkspaceVersions": true
},
{
"name": "NpmBuild",
"stageLabel": "build",
"enabled": false,
"workspaceRoot": "..\\..\\..\\src",
"useCi": true,
"buildScript": "build"
},
{
"name": "NpmPublish",
"stageLabel": "release",
"enabled": false,
"npmSecret": "Npm",
"registry": "https://registry.npmjs.org",
"access": "public",
"workspaceRoot": "..\\..\\..\\src",
"publishOrder": [
"@scope/example-contracts",
"@scope/example-core"
]
},
{
"name": "CleanupArtifacts",
"stageLabel": "release",