Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
18 changes: 13 additions & 5 deletions .github/workflows/release-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,26 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.101
dotnet-version: 3.1.x

- name: Install dependencies
run: dotnet restore src/Appium.Net.sln

- 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
7 changes: 2 additions & 5 deletions src/Appium.Net/Appium.Net.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net48;net45</TargetFrameworks>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here
net45 target

<TargetFrameworks>netstandard2.0;net48</TargetFrameworks>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<RootNamespace>OpenQA.Selenium</RootNamespace>
<Company>Appium Commiters</Company>
<Product>Dotnet-Client</Product>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Copyright>Copyright © 2022</Copyright>
<Copyright>Copyright © 2023</Copyright>
<PackageProjectUrl>https://github.com/appium/dotnet-client</PackageProjectUrl>
<RepositoryUrl>https://github.com/appium/dotnet-client</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand All @@ -32,9 +32,6 @@
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net48|AnyCPU'">
<DocumentationFile>Appium.Net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net45|AnyCPU'">
<DocumentationFile>Appium.Net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<None Include="LICENSE.txt" Pack="true" PackagePath="" />
Expand Down
2 changes: 1 addition & 1 deletion test/integration/Appium.Net.Integration.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net48;net45</TargetFrameworks>
<TargetFrameworks>net48</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Remove="apps\**" />
Expand Down