fix release pipeline (#1889)

* fix release pipeline

* ensure minver is applied
This commit is contained in:
Erwin van der Valk 2025-03-19 08:17:52 +01:00 committed by GitHub
parent 5aa124dbad
commit ca847ad364
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 26 additions and 16 deletions

View file

@ -211,7 +211,7 @@ void GenerateTemplatesReleaseWorkflow(Product product)
workflow.On
.WorkflowDispatch()
.Inputs(new StringInput("version", "Version in format X.Y.Z or X.Y.Z-preview.", true, "0.0.0"));
.InputVersionBranchAndTagOverride();
workflow.EnvDefaults();
@ -232,11 +232,13 @@ void GenerateTemplatesReleaseWorkflow(Product product)
job.StepGitRemoveExistingTagIfConfigured(product, contexts);
job.StepGitPushTag(product, contexts);
job.StepToolRestore();
job.Step()
.Name("build templates")
.Run("dotnet run --project build");
job.StepToolRestore();
job.StepPack(product.Solution);
job.StepSign(always: true);

View file

@ -9,6 +9,16 @@ on:
type: string
required: true
default: '0.0.0'
branch:
description: '(Optional) the name of the branch to release from'
type: string
required: false
default: 'main'
remove-tag-if-exists:
description: 'If set, will remove the existing tag. Use this if you have issues with the previous release action'
type: boolean
required: false
default: false
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@ -55,10 +65,12 @@ jobs:
run: |-
git tag -a templates-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}"
git push origin templates-${{ github.event.inputs.version }}
- name: build templates
run: dotnet run --project build
- name: Tool restore
run: dotnet tool restore
- name: build templates
run: dotnet run --project build
- name: Pack ../artifacts/templates.csproj
run: dotnet pack -c Release ../artifacts/templates.csproj -o artifacts
- name: Sign packages
run: |-
for file in artifacts/*.nupkg; do

View file

@ -1,12 +0,0 @@
{
"version": 1,
"isRoot": true,
"tools": {
"NuGetKeyVaultSignTool": {
"version": "3.2.3",
"commands": [
"NuGetKeyVaultSignTool"
]
}
}
}

View file

@ -39,4 +39,11 @@
<None Include="$(PackageReadmePath)" Pack="true" PackagePath="" />
<None Include="../LICENSE" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MinVer">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

View file

@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<PackageId>Duende.Templates</PackageId>
<Description>Templates for Duende Identity Server and Duende BFF </Description>
<PackageTags>dotnet-new;templates;duende;bff;</PackageTags>