Skip to content

Commit

Permalink
Nuget release automation (#329)
Browse files Browse the repository at this point in the history
* Setup two automated jobs based on branch name

* Fix path name for beta

* Delete outdated releases

* Downgrade version to 7.0.0-beta

* Remove tag assembly version

* Fix Vonage.Server version
  • Loading branch information
Tr00d authored Jan 16, 2023
1 parent 07c9321 commit 26b0cbc
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 62 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/publish-nuget-beta.yml

This file was deleted.

49 changes: 43 additions & 6 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Nuget Release
on: workflow_dispatch
on:
release:
types: [ published ]
jobs:
build:
coreSDK:
runs-on: ubuntu-latest
if: contains(github.event.release.target_commitish, 'release/core/')
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}
ref: ${{ github.event.release.target_commitish }}
- name: Release Nuget
uses: nexmo/github-actions/nuget-release@main
env:
PROJECT_FILE: Vonage/Vonage.csproj
BRANCH: main
BRANCH: ${{ github.event.release.target_commitish }}
ORGANIZATION: Vonage
REPO: vonage-dotnet-sdk
TAG: ${{ github.event.release.tag_name }}
Expand All @@ -20,11 +23,11 @@ jobs:
GITHUB_USER_NAME: NexmoDev
GITHUB_EMAIL: 44278943+NexmoDev@users.noreply.github.com
OUTPUT_PATH: Vonage/bin/Release
- name: Release Nuget
- name: Release Nuget Signed
uses: nexmo/github-actions/nuget-release@main
env:
PROJECT_FILE: Vonage/Vonage.csproj
BRANCH: main
BRANCH: ${{ github.event.release.target_commitish }}
ORGANIZATION: Vonage
REPO: vonage-dotnet-sdk
TAG: ${{ github.event.release.tag_name }}
Expand All @@ -34,3 +37,37 @@ jobs:
GITHUB_EMAIL: 44278943+NexmoDev@users.noreply.github.com
OUTPUT_PATH: Vonage/bin/ReleaseSigned
CONFIGURATION: ReleaseSigned
videoSDK:
runs-on: ubuntu-latest
if: contains(github.event.release.target_commitish, 'release/video/')
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}
- name: Release Nuget
uses: nexmo/github-actions/nuget-release@main
env:
PROJECT_FILE: Vonage.Server/Vonage.Server.csproj
BRANCH: ${{ github.event.release.target_commitish }}
ORGANIZATION: Vonage
REPO: vonage-dotnet-sdk
TAG: ${{ github.event.release.tag_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GITHUB_USER_NAME: NexmoDev
GITHUB_EMAIL: 44278943+NexmoDev@users.noreply.github.com
OUTPUT_PATH: Vonage.Server/bin/ReleaseSigned
- name: Release Nuget Signed
uses: nexmo/github-actions/nuget-release@main
env:
PROJECT_FILE: Vonage.Server/Vonage.Server.csproj
BRANCH: ${{ github.event.release.target_commitish }}
ORGANIZATION: Vonage
REPO: vonage-dotnet-sdk
TAG: ${{ github.event.release.tag_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GITHUB_USER_NAME: NexmoDev
GITHUB_EMAIL: 44278943+NexmoDev@users.noreply.github.com
OUTPUT_PATH: Vonage.Server/bin/ReleaseSigned
CONFIGURATION: ReleaseSigned
16 changes: 0 additions & 16 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 1 addition & 2 deletions Vonage.Server/Vonage.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@
<PackageIconUrl/>
<Description>Official C#/.NET wrapper for the Vonage API. To use it you will need a Vonage account. Sign up for free at vonage.com. For full API documentation refer to developer.vonage.com.
</Description>
<Version>8.0.0-beta</Version>
<Version>7.0.0-beta</Version>
<Authors>Vonage</Authors>
<PackageTags>Video Vonage</PackageTags>
<AssemblyName>Vonage.Server</AssemblyName>
<RootNamespace>Vonage.Server</RootNamespace>
<Product>Vonage.Server</Product>
<AssemblyVersion>8.0.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
Expand Down
2 changes: 0 additions & 2 deletions Vonage.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{
ProjectSection(SolutionItems) = preProject
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
.github\workflows\publish-nuget.yml = .github\workflows\publish-nuget.yml
.github\workflows\release.yml = .github\workflows\release.yml
.github\workflows\mutation-testing.yml = .github\workflows\mutation-testing.yml
.github\workflows\publish-nuget-beta.yml = .github\workflows\publish-nuget-beta.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vonage.Server", "Vonage.Server\Vonage.Server.csproj", "{AC22C44D-AE7A-4FA1-8EA3-479578D6E3C6}"
Expand Down

0 comments on commit 26b0cbc

Please sign in to comment.