Skip to content

Respect API version when building URL to downstream swagger.json (#301) #135

Respect API version when building URL to downstream swagger.json (#301)

Respect API version when building URL to downstream swagger.json (#301) #135

Workflow file for this run

name: Publish package
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core if needed
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build ./MMLib.SwaggerForOcelot.sln --configuration Release
- name: Test
run: dotnet test ./MMLib.SwaggerForOcelot.sln --configuration Release
- name: Benchmark
run: dotnet run --project ./tests/MMLib.SwaggerForOcelot.BenchmarkTests/MMLib.SwaggerForOcelot.BenchmarkTests.csproj -c Release
- name: Generate nuget package
run: dotnet pack ./src/MMLib.SwaggerForOcelot/MMLib.SwaggerForOcelot.csproj --configuration Release -o nupkg
- name: Publish nuget package
run: find . -name *.nupkg -type f -print0 | xargs -0 -I pkg dotnet nuget push pkg -k $nuget_api_key -s "https://api.nuget.org/v3/index.json" --skip-duplicate
env:
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
working-directory: ./nupkg