-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1.42 KB
/
push-in-master.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
31
32
33
34
35
36
37
38
39
40
name: Publish
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: '3.1.100'
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test
- name: Setup Nuget.exe
uses: nuget/setup-nuget@v1
- name: Add GitHub nuget repo to sources
run: nuget sources add -name "GPR" -Source https://nuget.pkg.github.com/vudodov/index.json -Username vudodov -Password ${{ secrets.GITHUB_TOKEN }}
- name: Pack
run: dotnet pack --output ./nupkg/
- name: Push Infrastructure to GitHub
run: nuget push **/nupkg/http-commanding-infrastructure.*.nupkg -source "GPR" -SkipDuplicate
- name: Push Middleware to GitHub
run: nuget push **/nupkg/http-commanding-middleware.*.nupkg -source "GPR" -SkipDuplicate
- name: Push Infrastructure to NuGet
env:
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
run: dotnet nuget push **/nupkg/http-commanding-infrastructure.*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Push Middleware to NuGet
env:
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
run: dotnet nuget push **/nupkg/http-commanding-middleware.*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate