7
7
branches : [master]
8
8
9
9
jobs :
10
- gitversion :
10
+ build :
11
11
runs-on : ubuntu-latest
12
12
13
13
outputs :
25
25
- id : gitversion
26
26
uses :
gittools/actions/gitversion/[email protected]
27
27
28
- build :
29
- runs-on : ubuntu-latest
30
-
31
- steps :
32
- - uses : actions/checkout@v2
33
-
34
- - name : Setup .NET Core
35
- uses : actions/setup-dotnet@v1
28
+ - uses : actions/setup-dotnet@v1
36
29
with :
37
30
dotnet-version : 2.1.401
38
31
@@ -44,29 +37,11 @@ jobs:
44
37
key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
45
38
restore-keys : ${{ runner.os }}-nuget-
46
39
47
- - name : Install dependencies
48
- run : dotnet restore
49
-
50
- - name : Build
51
- run : dotnet build --configuration Release --no-restore
52
-
53
- - uses : actions/upload-artifact@v2
54
- with :
55
- name : build
56
- path : .
57
-
58
- test :
59
- runs-on : ubuntu-latest
60
- needs : build
40
+ - run : dotnet restore
61
41
62
- steps :
63
- - uses : actions/download-artifact@v2
64
- with :
65
- name : build
66
- path : .
42
+ - run : dotnet build --configuration Release --no-restore
67
43
68
- - name : Test
69
- run : |
44
+ - run : |
70
45
dotnet test \
71
46
--configuration Release \
72
47
--no-build \
@@ -80,28 +55,13 @@ jobs:
80
55
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
81
56
run : bash <(curl -s https://codecov.io/bash)
82
57
83
- nuget-pack :
84
- runs-on : ubuntu-latest
85
- needs : [build, gitversion]
86
-
87
- steps :
88
- - uses : actions/download-artifact@v2
89
- with :
90
- name : build
91
- path : .
92
-
93
- - name : Setup .NET Core
94
- uses : actions/setup-dotnet@v1
95
- with :
96
- dotnet-version : 2.1.401
97
-
98
58
- name : NuGet Pack
99
59
run : |
100
60
dotnet pack \
101
61
--include-source \
102
62
--no-build \
103
63
--no-restore \
104
- -p:PackageVersion="${{ needs .gitversion.outputs.fullSemVer }}" \
64
+ -p:PackageVersion="${{ steps .gitversion.outputs.fullSemVer }}" \
105
65
src/json-ld.net/json-ld.net.csproj \
106
66
--output nugets/
107
67
0 commit comments