Skip to content

Commit

Permalink
Publish to nuget WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
SushilMallRC committed May 13, 2024
1 parent 61e9aa0 commit 63d96ce
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 23 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release-with-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release
on:
push:
tags:
- '*'

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
NuGetDirectory: ${{ github.workspace}}/nuget
RINGCENTRAL_SERVER_URL: ${{ secrets.RINGCENTRAL_SERVER_URL }}
RINGCENTRAL_CLIENT_ID: ${{ secrets.RINGCENTRAL_CLIENT_ID }}
RINGCENTRAL_CLIENT_SECRET: ${{ secrets.RINGCENTRAL_CLIENT_SECRET }}
INGCENTRAL_JWT_TOKEN: ${{ secrets.RINGCENTRAL_JWT_TOKEN }}
RINGCENTRAL_SENDER: ${{ secrets.RINGCENTRAL_SENDER }}
RINGCENTRAL_RECEIVER: ${{ secrets.RINGCENTRAL_RECEIVER }}


jobs:
Create_Nuget:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Code Coverage
run: dotnet test --collect:"XPlat Code Coverage"
- name: Create NuGet package
run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
retention-days: 7
path: ${{ env.NuGetDirectory }}/*.nupkg

Publish_NuGet:
runs-on: macos-latest
needs: [ Create_Nuget]
steps:
# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v4
with:
name: nuget
path: ${{ env.NuGetDirectory }}



# Publish all NuGet packages to NuGet.org
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
# If you retry a failed workflow, already published packages will be skipped without error.
- name: Publish NuGet package
run: |
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net.AuthorizeUri</PackageId>
<PackageVersion>1.0.1</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageId>Test-RingCentral.Net.AuthorizeUri</PackageId>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (sushil.mall@ringcentral.com)</Authors>
<Description>Authorize URI extension for RingCentral.Net</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net.AutoRefresh</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageId>Test-RingCentral.Net.AutoRefresh</PackageId>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (sushil.mall@ringcentral.com)</Authors>
<Description>Auto Refresh extension for RingCentral.Net</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
6 changes: 3 additions & 3 deletions RingCentral.Net.Debug/RingCentral.Net.Debug.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net.Debug</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageId>TEST-RingCentral.Net.Debug</PackageId>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (sushil.mall@ringcentral.com)</Authors>
<Description>Debug extension for RingCentral.Net</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
6 changes: 3 additions & 3 deletions RingCentral.Net.Events/RingCentral.Net.Events.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net.Events</PackageId>
<PackageVersion>1.0.0</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageId>TEST-RingCentral.Net.Events</PackageId>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (sushil.mall@ringcentral.com)</Authors>
<Description>Events extension for RingCentral.Net</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
6 changes: 3 additions & 3 deletions RingCentral.Net.RateLimit/RingCentral.Net.RateLimit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net.RateLimit</PackageId>
<PackageVersion>1.0.2</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageId>TEST-RingCentral.Net.RateLimit</PackageId>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (sushil.mall@ringcentral.com)</Authors>
<Description>Rate limit extension for RingCentral.Net</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
6 changes: 3 additions & 3 deletions RingCentral.Net.Retry/RingCentral.Net.Retry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net.Retry</PackageId>
<PackageVersion>1.0.1</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageId>TEST-</PackageId>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (sushil.mall@ringcentral.com)</Authors>
<Description>Retry extension for RingCentral.Net</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
4 changes: 2 additions & 2 deletions RingCentral.Net.WebSocket/RingCentral.Net.WebSocket.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net.WebSocket</PackageId>
<PackageVersion>2.3.4</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (sushil.mall@ringcentral.com)</Authors>
<Description>WebSocket extension for RingCentral.NET,</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
6 changes: 3 additions & 3 deletions RingCentral.Net/RingCentral.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>RingCentral.Net</PackageId>
<PackageVersion>6.1.5</PackageVersion>
<Authors>Tyler Liu (tyler.liu@ringcentral.com)</Authors>
<PackageId>test-RingCentral.Net</PackageId>
<PackageVersion>0.0.1</PackageVersion>
<Authors>Sushil Mall (Sushil.mall@ringcentral.com)</Authors>
<Description>RingCentral SDK for .NET</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down

0 comments on commit 63d96ce

Please sign in to comment.