Skip to content

Commit 53b5291

Browse files
authored
Merge pull request #15 from cmdotcom/feature/net8
GitHub workflows and .NET 8 support
2 parents f2e793d + b29d1df commit 53b5291

File tree

5 files changed

+78
-19
lines changed

5 files changed

+78
-19
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: .NET Build & Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
name: Build and test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v2
17+
with:
18+
dotnet-version: |
19+
6.0.x
20+
7.0.x
21+
8.0.x
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
- name: Build
25+
run: dotnet build --no-restore
26+
- name: Test
27+
run: dotnet test --no-build --verbosity normal

.github/workflows/nuget.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: .NET NuGET Publish
2+
3+
on:
4+
release:
5+
types: released
6+
7+
jobs:
8+
nugetpush:
9+
name: Build, test and push to NuGET
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v3
16+
with:
17+
dotnet-version: |
18+
6.0.x
19+
7.0.x
20+
8.0.x
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
- name: Build
24+
run: dotnet build --no-restore
25+
- name: Test
26+
run: dotnet test --no-build --verbosity normal
27+
- name: Publish to Nuget.org
28+
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.nuget_apikey }} -s https://api.nuget.org/v3/index.json
29+
- name: Add Github Packages source
30+
run: dotnet nuget add source --username cmdotcom --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/cmdotcom/index.json"
31+
- name: Publish to Github Packages
32+
run: dotnet nuget push **/*.nupkg -s github

CM.Voice.VoiceApi.Sdk.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
.gitignore = .gitignore
1414
LICENSE.md = LICENSE.md
1515
README.md = README.md
16+
.github/workflows/main.yml = .github/workflows/main.yml
17+
.github/workflows/nuget.yml = .github/workflows/nuget.yml
1618
EndProjectSection
1719
EndProject
1820
Global
Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Authors>mjepson</Authors>
6-
<Version>1.0.0</Version>
7-
<Description>SDK for use with the CM Voice API.</Description>
8-
<PackageProjectUrl>https://github.com/CMTelecom/VoiceApiSdk</PackageProjectUrl>
9-
<Company>CM Telecom</Company>
10-
<PackageIconUrl>http://cdn.cmtelecom.com/images/cm-nuget.png</PackageIconUrl>
11-
<RepositoryUrl>https://github.com/CMTelecom/VoiceApiSdk</RepositoryUrl>
4+
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
5+
<Authors>CM Talk</Authors>
6+
<Company>CM.com</Company>
7+
<Product>CM Talk SDK</Product>
8+
<Description>A software development kit to provide ways to interact with CM.com's Talk/Voice API.</Description>
9+
<PackageTags>voice, talk</PackageTags>
10+
<RepositoryUrl>https://github.com/cmdotcom/talk-sdk-dotnet</RepositoryUrl>
1211
<RepositoryType>Github</RepositoryType>
13-
<PackageTags>SDK, CM, VoiceAPI</PackageTags>
14-
<Copyright>2018 CM Telecom</Copyright>
15-
<PackageLicenseUrl>https://mit-license.org</PackageLicenseUrl>
16-
<PackageReleaseNotes>First version with support for sending instructions using a simple client.</PackageReleaseNotes>
12+
<Copyright>$([System.DateTime]::UtcNow.Year) CM.com</Copyright>
13+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
14+
<PackageIconUrl>https://cdn.cmtelecom.com/images/cm-nuget.png</PackageIconUrl>
15+
<Version>1.8.0</Version>
16+
<PackageProjectUrl>https://github.com/cmdotcom/talk-sdk-dotnet</PackageProjectUrl>
17+
<NeutralLanguage>en</NeutralLanguage>
18+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
19+
<AssemblyVersion>1.8.0</AssemblyVersion>
20+
<FileVersion>1.8.0</FileVersion>
1721
</PropertyGroup>
1822

1923
<ItemGroup>
2024
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
2125
</ItemGroup>
2226

23-
<ItemGroup>
24-
<Reference Include="Newtonsoft.Json">
25-
<HintPath>..\..\..\..\Users\Michael.Jepson\.nuget\packages\newtonsoft.json\9.0.1\lib\netstandard1.0\Newtonsoft.Json.dll</HintPath>
26-
</Reference>
27-
</ItemGroup>
28-
2927
</Project>

Tests/Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)