Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/Appium.Net/Appium.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Product>Appium-Dotnet-Driver</Product>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Copyright>Copyright © 2022</Copyright>
<Copyright>Copyright © 2023</Copyright>
<PackageProjectUrl>https://github.com/appium/appium-dotnet-driver</PackageProjectUrl>
<RepositoryUrl>https://github.com/appium/appium-dotnet-driver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down