Update workflows #1
This file contains 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: openapi-client-cd-nuget | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: microsoft/[email protected] | |
with: | |
msbuild-architecture: x64 | |
- uses: nuget/setup-nuget@v2 | |
with: | |
nuget-api-key: ${{ secrets.NUGET_API_KEY }} | |
- name: Setup .NET Core SDK 8.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build src\OpenApi.Client\OpenApi.Client.csproj --configuration Release --no-restore | |
- name: Publish the package to NuGet.org | |
run: nuget push **\*.nupkg -NonInteractive -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json' | |
- name: Publish the symbols to NuGet.org | |
run: nuget push **\*.snupkg -NonInteractive -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json' |