From bd8799bd69e3ed40181f0463f66d54b981b71c8d Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Wed, 6 Mar 2024 16:04:29 +1100 Subject: [PATCH 01/11] Add workflow to release packages --- .github/workflows/build-and-publish.yaml | 28 ++++++++++++++++++++++++ version.json | 21 +++++++++--------- 2 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build-and-publish.yaml diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml new file mode 100644 index 0000000..c22a4e6 --- /dev/null +++ b/.github/workflows/build-and-publish.yaml @@ -0,0 +1,28 @@ +name: Build and Publish JAR Packages +run-name: ${{ inputs.release_type == 'Snapshot' && 'Publish pre-release' || format('Release {0}', inputs.release_type)}} Package by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + release_type: + type: choice + description: The type of release + options: + - Major + - Minor + - Patch + - Snapshot + publish_vulnerabilities: + type: string + default: true + dotnet_version: + type: string + default: 5.0 + +jobs: + build-and-pubish: + name: Build and publish JAR packages to Maven repository + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-nuget-versioned.yaml@kcc-UID2-2329-add-dotnet-pipeline + with: + release_type: ${{ inputs.release_type }} + dotnet_version: ${{ inputs.dotnet_version }} + secrets: inherit diff --git a/version.json b/version.json index 41721a9..d98ca99 100644 --- a/version.json +++ b/version.json @@ -1,16 +1,17 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "2.0.2", + "version": "5.4", "publicReleaseRefSpec": [ - "^refs/heads/master$", - "^refs/heads/release/v\\d+(?:\\.\\d+)?$" + "^refs/heads/master$", + "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { - "buildNumber": { - "enabled": true - } - }, - "release": { - "branchName": "release/v{version}" + "setVersionVariables": true, + "buildNumber": { + "enabled": true, + "includeCommitId": { + "when": "always" + } + } } -} +} \ No newline at end of file From d7ea48bf797cf3e7bf58adf7a1691058afbbcd2a Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Wed, 6 Mar 2024 17:25:56 +1100 Subject: [PATCH 02/11] Add nuget api key --- .github/workflows/build-and-publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index c22a4e6..f08e835 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -25,4 +25,5 @@ jobs: with: release_type: ${{ inputs.release_type }} dotnet_version: ${{ inputs.dotnet_version }} + nuget_api_key: ${{ secrets.NUGET_API_KEY }} secrets: inherit From c7384be279c2f514d17054dde59a1097f6789a40 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Wed, 6 Mar 2024 17:32:59 +1100 Subject: [PATCH 03/11] Remove secrets.NUGET_API_KEY --- .github/workflows/build-and-publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index f08e835..c22a4e6 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -25,5 +25,4 @@ jobs: with: release_type: ${{ inputs.release_type }} dotnet_version: ${{ inputs.dotnet_version }} - nuget_api_key: ${{ secrets.NUGET_API_KEY }} secrets: inherit From 834c351f1681935683977b21baf3e6dac0f92d5c Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Thu, 7 Mar 2024 14:22:35 +1100 Subject: [PATCH 04/11] Add EOF for version.json --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index d98ca99..3455894 100644 --- a/version.json +++ b/version.json @@ -14,4 +14,4 @@ } } } -} \ No newline at end of file +} From 3961757ee1e6b01491261f9a884dc342b4f82a3b Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Thu, 7 Mar 2024 15:05:13 +1100 Subject: [PATCH 05/11] Remove Snapshot version for release --- .github/workflows/build-and-publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index c22a4e6..ab44b6e 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -10,7 +10,6 @@ on: - Major - Minor - Patch - - Snapshot publish_vulnerabilities: type: string default: true From 156f8737f5b046781b40f7fa2cb09f0c9688d9c4 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Thu, 7 Mar 2024 15:25:09 +1100 Subject: [PATCH 06/11] Add testing commit to build a different version --- UID2.Client.nuspec | 2 +- src/UID2.Client/UID2Client.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UID2.Client.nuspec b/UID2.Client.nuspec index c66875c..541da8c 100644 --- a/UID2.Client.nuspec +++ b/UID2.Client.nuspec @@ -2,7 +2,7 @@ UID2.Client - 5.4.0 + 5.4.5 UID2 Client C# SDK UID2 team UID2 team diff --git a/src/UID2.Client/UID2Client.cs b/src/UID2.Client/UID2Client.cs index 5170f04..0577b49 100644 --- a/src/UID2.Client/UID2Client.cs +++ b/src/UID2.Client/UID2Client.cs @@ -134,7 +134,7 @@ public async Task RefreshAsync(CancellationToken token) private string GetAssemblyNameAndVersion() { - var version = "5.4.0"; + var version = "5.4.5"; return "uid-client-net-" + version; } From 41decfe1ea97da14ab3f011ef9126d00773b753f Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Thu, 7 Mar 2024 15:34:12 +1100 Subject: [PATCH 07/11] Revert previous change to generate another test commit --- UID2.Client.nuspec | 2 +- src/UID2.Client/UID2Client.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UID2.Client.nuspec b/UID2.Client.nuspec index 541da8c..c66875c 100644 --- a/UID2.Client.nuspec +++ b/UID2.Client.nuspec @@ -2,7 +2,7 @@ UID2.Client - 5.4.5 + 5.4.0 UID2 Client C# SDK UID2 team UID2 team diff --git a/src/UID2.Client/UID2Client.cs b/src/UID2.Client/UID2Client.cs index 0577b49..5170f04 100644 --- a/src/UID2.Client/UID2Client.cs +++ b/src/UID2.Client/UID2Client.cs @@ -134,7 +134,7 @@ public async Task RefreshAsync(CancellationToken token) private string GetAssemblyNameAndVersion() { - var version = "5.4.5"; + var version = "5.4.0"; return "uid-client-net-" + version; } From 8e9ffe72d73c7daf3b6d8aa5bdfb2725cfcc1a7a Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Thu, 7 Mar 2024 15:49:52 +1100 Subject: [PATCH 08/11] Bump version to 5.4.7 --- UID2.Client.nuspec | 2 +- src/UID2.Client/UID2Client.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UID2.Client.nuspec b/UID2.Client.nuspec index c66875c..eb88db6 100644 --- a/UID2.Client.nuspec +++ b/UID2.Client.nuspec @@ -2,7 +2,7 @@ UID2.Client - 5.4.0 + 5.4.7 UID2 Client C# SDK UID2 team UID2 team diff --git a/src/UID2.Client/UID2Client.cs b/src/UID2.Client/UID2Client.cs index 5170f04..3eadc29 100644 --- a/src/UID2.Client/UID2Client.cs +++ b/src/UID2.Client/UID2Client.cs @@ -134,7 +134,7 @@ public async Task RefreshAsync(CancellationToken token) private string GetAssemblyNameAndVersion() { - var version = "5.4.0"; + var version = "5.4.7"; return "uid-client-net-" + version; } From f8be4105cca2c6038d949b3486459c4a2617e147 Mon Sep 17 00:00:00 2001 From: Release Workflow Date: Thu, 7 Mar 2024 04:51:33 +0000 Subject: [PATCH 09/11] [CI Pipeline] Released Patch version: 5.4.8 --- UID2.Client.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UID2.Client.nuspec b/UID2.Client.nuspec index eb88db6..101a2e8 100644 --- a/UID2.Client.nuspec +++ b/UID2.Client.nuspec @@ -2,7 +2,7 @@ UID2.Client - 5.4.7 + 5.4.8 UID2 Client C# SDK UID2 team UID2 team From 3b7edc4ee8ee51dbfdfd66b6c9eba06426ec625d Mon Sep 17 00:00:00 2001 From: Release Workflow Date: Fri, 8 Mar 2024 01:08:12 +0000 Subject: [PATCH 10/11] [CI Pipeline] Released Patch version: 5.4.9 --- UID2.Client.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UID2.Client.nuspec b/UID2.Client.nuspec index 101a2e8..d210e84 100644 --- a/UID2.Client.nuspec +++ b/UID2.Client.nuspec @@ -2,7 +2,7 @@ UID2.Client - 5.4.8 + 5.4.9 UID2 Client C# SDK UID2 team UID2 team From 5cbe6f785bddc1839ebdd38edaada4308048f68f Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Fri, 8 Mar 2024 17:58:36 +1100 Subject: [PATCH 11/11] Final cleanup for versions --- .github/workflows/build-and-publish.yaml | 2 +- src/UID2.Client/UID2Client.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index ab44b6e..7b04795 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -20,7 +20,7 @@ on: jobs: build-and-pubish: name: Build and publish JAR packages to Maven repository - uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-nuget-versioned.yaml@kcc-UID2-2329-add-dotnet-pipeline + uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-publish-to-nuget-versioned.yaml@v2 with: release_type: ${{ inputs.release_type }} dotnet_version: ${{ inputs.dotnet_version }} diff --git a/src/UID2.Client/UID2Client.cs b/src/UID2.Client/UID2Client.cs index 3eadc29..6404bdc 100644 --- a/src/UID2.Client/UID2Client.cs +++ b/src/UID2.Client/UID2Client.cs @@ -134,7 +134,7 @@ public async Task RefreshAsync(CancellationToken token) private string GetAssemblyNameAndVersion() { - var version = "5.4.7"; + var version = "5.4.9"; return "uid-client-net-" + version; }