Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UID2-2329 Add workflow to release packages #29

Merged
merged 11 commits into from
Mar 8, 2024
27 changes: 27 additions & 0 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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
publish_vulnerabilities:
type: string
default: true
dotnet_version:
type: string
default: 5.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this just for dot net version for running to build the binary or does this correspond to some setting in the c# SDK repo?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or i just would like to know when should we modify this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment this is used to build/package/test dotnet.

When we bump the version in the code, we can change this in the action interface.


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@v2
with:
release_type: ${{ inputs.release_type }}
dotnet_version: ${{ inputs.dotnet_version }}
secrets: inherit
2 changes: 1 addition & 1 deletion UID2.Client.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>UID2.Client</id>
<version>5.4.0</version>
<version>5.4.9</version>
<title>UID2 Client C# SDK</title>
<authors>UID2 team</authors>
<owners>UID2 team</owners>
Expand Down
2 changes: 1 addition & 1 deletion src/UID2.Client/UID2Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public async Task<RefreshResponse> RefreshAsync(CancellationToken token)

private string GetAssemblyNameAndVersion()
{
var version = "5.4.0";
var version = "5.4.9";
return "uid-client-net-" + version;
}

Expand Down
19 changes: 10 additions & 9 deletions version.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}