Skip to content

Commit 1b67167

Browse files
committed
feat: enhance manual package publishing workflow with additional input for LocalStack client version and update default package source to GitHub
1 parent 108d22c commit 1b67167

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.github/workflows/publish-nuget.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ on:
66
package-version:
77
description: "Package Version"
88
required: true
9+
localstack-client-version:
10+
description: "LocalStack Client Version"
11+
required: true
912
package-source:
1013
type: choice
1114
description: Package Source
1215
required: true
13-
default: "nuget"
16+
default: "github"
1417
options:
1518
- nuget
1619
- github
@@ -93,7 +96,7 @@ jobs:
9396
./build.sh --target nuget-prepare-extensions \
9497
--package-source ${{ github.event.inputs.package-source }} \
9598
--package-id ${{ github.event.inputs.package-id }} \
96-
--package-version ${{ github.event.inputs.package-version }}
99+
--client-version ${{ github.event.inputs.localstack-client-version }}
97100
98101
- name: "Pack NuGet Package"
99102
run: |

build/LocalStack.Build/BuildContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public string GetEffectivePackageVersion(string packageId)
139139
{
140140
LocalStackClientProjName => GetClientPackageVersion(),
141141
LocalStackClientExtensionsProjName => GetExtensionsPackageVersion(),
142-
_ => throw new ArgumentException($"Unknown package ID: {packageId}", nameof(packageId))
142+
_ => throw new ArgumentException($"Unknown package ID: {packageId}", nameof(packageId)),
143143
};
144144
}
145145

build/LocalStack.Build/CakeTasks/Nuget/NugetPrepareExtensionsTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private static void PrepareExtensionsProject(BuildContext context, string versio
4343
// Add package reference with specific version and source
4444
var packageSettings = new DotNetPackageAddSettings
4545
{
46-
Version = version
46+
Version = version,
4747
};
4848

4949
// Add source if not NuGet (GitHub Packages, MyGet, etc.)

build/LocalStack.Build/CakeTasks/Nuget/Services/PackageOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private static string GetDownloadUrl(string packageSource, string packageId, str
193193
BuildContext.GitHubPackageSource => $"https://github.com/localstack-dotnet/localstack-dotnet-client/packages/nuget/{packageId}",
194194
BuildContext.NuGetPackageSource => $"https://www.nuget.org/packages/{packageId}/{version}",
195195
BuildContext.MyGetPackageSource => $"https://www.myget.org/packages/{packageId}/{version}",
196-
_ => "Unknown package source"
196+
_ => "Unknown package source",
197197
};
198198
}
199199

0 commit comments

Comments
 (0)