File tree Expand file tree Collapse file tree 2 files changed +54
-33
lines changed
Expand file tree Collapse file tree 2 files changed +54
-33
lines changed Original file line number Diff line number Diff line change 1- name : CI / CD
1+ name : Continuous Integration
22
3- on :
4- push :
5- branches : ["**"]
6- tags :
7- - " v*"
8- pull_request :
9- branches : ["**"]
3+ on : [push, pull_request]
104
115jobs :
126 test :
2923
3024 - name : Run tests
3125 run : dotnet test --no-build --configuration Release --verbosity normal
32-
33- publish :
34- needs : test
35- if : startsWith(github.ref, 'refs/tags/v')
36- runs-on : ubuntu-lates
37- steps :
38- - name : Checkout code
39- uses : actions/checkout@v4
40-
41- - name : Setup .NET
42- uses : actions/setup-dotnet@v4
43- with :
44- dotnet-version : " 9.0.x"
45-
46- - name : Restore dependencies
47- run : dotnet restore
48-
49- - name : Build
50- run : dotnet build OpenSkillSharp/OpenSkillSharp.csproj --configuration Release --no-restore
51-
52- - name : Pack
53- run : dotnet pack OpenSkillSharp/OpenSkillSharp.csproj --configuration Release --no-build --output ./nupkg /p:Version=${GITHUB_REF#refs/tags/v}
54-
55- - name : Publish to NuGet
56- run : dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+
16+ - name : Setup .NET
17+ uses : actions/setup-dotnet@v4
18+ with :
19+ dotnet-version : " 9.0.x"
20+
21+ - name : Restore dependencies
22+ run : dotnet restore
23+
24+ - name : Build
25+ run : dotnet build --no-restore --configuration Release
26+
27+ - name : Run tests
28+ run : dotnet test --no-build --configuration Release --verbosity normal
29+
30+ publish :
31+ needs : test
32+ runs-on : ubuntu-latest
33+ steps :
34+ - name : Checkout code
35+ uses : actions/checkout@v4
36+
37+ - name : Setup .NET
38+ uses : actions/setup-dotnet@v4
39+ with :
40+ dotnet-version : " 9.0.x"
41+
42+ - name : Restore dependencies
43+ run : dotnet restore
44+
45+ - name : Build
46+ run : dotnet build OpenSkillSharp/OpenSkillSharp.csproj --configuration Release --no-restore
47+
48+ - name : Pack
49+ run : dotnet pack OpenSkillSharp/OpenSkillSharp.csproj --configuration Release --no-build --output ./nupkg /p:Version=${GITHUB_REF#refs/tags/v}
50+
51+ - name : Publish to NuGet
52+ run : dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
You can’t perform that action at this time.
0 commit comments