diff --git a/.github/workflows/release-nuget.yml b/.github/workflows/release-nuget.yml
index 6d1cb850..9aced2d5 100644
--- a/.github/workflows/release-nuget.yml
+++ b/.github/workflows/release-nuget.yml
@@ -22,11 +22,19 @@ jobs:
- name: Build
run: |
- if ("${{github.ref}}".trim() -notmatch '^refs/tags/v(\d+\.\d+\.\d+)$') {
- exit 1
+ if ("${{github.ref}}".trim() -notmatch '^refs\/tags\/v(((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*))(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$') {
+ Write-Host "Failed to find a tag with a value compatible with Sementic Versioning.\nEnsure the Sementic Versioning regex above matches the tag created for the release!"; exit 1
}
- $version = $matches[1]
- dotnet build src/Appium.Net.sln --no-restore --configuration Release -p:Version=$version
+ else {
+ $versionPrefix = $matches[2]
+ $dotnetBuildCmd = "dotnet build src/Appium.Net.sln --configuration Release -p:VersionPrefix=${versionPrefix}"
+ if ($matches.Count -eq 7) {
+ $versionSuffix = $matches[6]
+ $dotnetBuildCmd += " --version-suffix ${versionSuffix}"
+ }
+ }
+ Write-Host $dotnetBuildCmd
+ Invoke-Expression $dotnetBuildCmd
- name: Deploy to nuget
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_DEPLOY_KEY }} --source https://api.nuget.org/v3/index.json
diff --git a/src/Appium.Net/Appium.Net.csproj b/src/Appium.Net/Appium.Net.csproj
index f81db266..a77c3b6b 100644
--- a/src/Appium.Net/Appium.Net.csproj
+++ b/src/Appium.Net/Appium.Net.csproj
@@ -8,7 +8,7 @@
Appium-Dotnet-Driver
false
true
- Copyright © 2022
+ Copyright © 2023
https://github.com/appium/appium-dotnet-driver
https://github.com/appium/appium-dotnet-driver
git