Update release-drafter.yml #131
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: 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 |