-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1.17 KB
/
nuget.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
name: nuget
on:
push:
branches: [ master ]
paths:
- 'src/6.0/**'
jobs:
nuget:
runs-on: ubuntu-latest
env:
MAJOR_VERSION: 6
MINOR_VERSION: 0
SOLUTION_PATH: ./src/6.0
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore $SOLUTION_PATH
- name: Build
run: dotnet build $SOLUTION_PATH --no-restore --ignore-failed-sources /p:Version=$MAJOR_VERSION.$MINOR_VERSION.$GITHUB_RUN_NUMBER -c Release
- name: Test
run: dotnet test $SOLUTION_PATH --no-restore --verbosity normal
- name: Create output folder
run: mkdir ./output
- name: Consolidate packages (including symbols)
run: find . -name "*$MAJOR_VERSION.$MINOR_VERSION.$GITHUB_RUN_NUMBER.*nupkg" -type f -exec cp {} ./output \;
- name: Echo packages
run: find ./output -name "*.*nupkg" -type f -exec echo {} \;
- name: Push
run: find ./output -name "*.nupkg" -type f -exec dotnet nuget push "{}" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source "https://api.nuget.org/v3/index.json" \;