-
Notifications
You must be signed in to change notification settings - Fork 96
30 lines (28 loc) · 1.05 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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