Skip to content

Merge pull request #22 from jiripeli/prerelease #13

Merge pull request #22 from jiripeli/prerelease

Merge pull request #22 from jiripeli/prerelease #13

Workflow file for this run

name: Build and Publish
on:
push:
branches: [ main, prerelease ]
defaults:
run:
working-directory: src
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack
run: dotnet pack -c Release
- name: Publish package to NuGet
run: dotnet nuget push /home/runner/work/NSwag.Examples/NSwag.Examples/src/NSwag.Examples/bin/Release/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate