Merge pull request #67 from ovh/release #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | ||
on: | ||
push: | ||
tags: | ||
- * | ||
permissions: | ||
contents: read | ||
env: | ||
DOTNET_VERSION: '6.0.401' # The .NET SDK version to use | ||
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }} | ||
NUGET_FEED_URL: https://api.nuget.org/v3/index.json | ||
jobs: | ||
publish: | ||
name: Publish csharp-ovh on Nuget | ||
runs-on: ubuntu-latest | ||
needs: publish_binary | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Building Nuget package | ||
run: dotnet pack -c Release csharp-ovh/csharp-ovh.csproj | ||
- name: Publish nuget package to Nuget.org | ||
run: | | ||
dotnet nuget push ${{github.workspace}}/csharp-ovh/bin/Release/csharp-ovh.*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ env.NUGET_PUBLISH_KEY }} --skip-duplicate | ||
echo "done publishing packages" |