@@ -3,7 +3,7 @@ name: Build
3
3
env :
4
4
DOTNET_NOLOGO : true
5
5
DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
6
- BUILD_PATH : ' ${{github.workspace}}/artifacts'
6
+ BUILD_PATH : " ${{github.workspace}}/artifacts"
7
7
COVERALLS_REPO_TOKEN : ${{ secrets.COVERALLS_REPO_TOKEN }}
8
8
9
9
on :
12
12
- master
13
13
- develop
14
14
tags :
15
- - ' v* '
15
+ - " v* "
16
16
pull_request :
17
17
branches :
18
18
- master
19
19
- develop
20
20
21
21
jobs :
22
-
23
22
build :
24
23
runs-on : ubuntu-latest
25
24
26
25
steps :
27
- - name : Checkout
28
- uses : actions/checkout@v4
29
- with :
30
- fetch-depth : 0
31
-
32
- - name : Install .NET Core
33
- uses : actions/setup-dotnet@v4
34
- with :
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+ with :
29
+ fetch-depth : 0
30
+
31
+ - name : Install .NET
32
+ uses : actions/setup-dotnet@v4
33
+ with :
35
34
dotnet-version : |
36
- 6.0.x
37
- 7.0.x
38
- 8.0.x
39
-
40
- - name : Restore Dependencies
41
- run : dotnet restore
35
+ 6.0.x
36
+ 7.0.x
37
+ 8.0.x
42
38
43
- - name : Build Solution
44
- run : dotnet build --no- restore --configuration Release
39
+ - name : Restore Dependencies
40
+ run : dotnet restore
45
41
46
- - name : Run Test
47
- run : dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
42
+ - name : Build Solution
43
+ run : dotnet build --no-restore --configuration Release
48
44
45
+ - name : Run Test
46
+ run : dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
49
47
50
- - name : Report Coverage
51
- if : success()
52
- uses : coverallsapp/github-action@v2
53
- with :
48
+ - name : Report Coverage
49
+ if : success()
50
+ uses : coverallsapp/github-action@v2
51
+ with :
54
52
file : " ${{github.workspace}}/test/*/TestResults/*/coverage.info"
55
53
format : lcov
56
54
57
- - name : Create Packages
58
- if : success() && github.event_name != 'pull_request'
59
- run : dotnet pack --configuration Release --no-build --output "${{env.BUILD_PATH}}"
55
+ - name : Create Packages
56
+ if : success() && github.event_name != 'pull_request'
57
+ run : dotnet pack --configuration Release --no-build --output "${{env.BUILD_PATH}}"
60
58
61
- - name : Upload Packages
62
- if : success() && github.event_name != 'pull_request'
63
- uses : actions/upload-artifact@v4
64
- with :
65
- name : packages
66
- path : ' ${{env.BUILD_PATH}}'
59
+ - name : Upload Packages
60
+ if : success() && github.event_name != 'pull_request'
61
+ uses : actions/upload-artifact@v4
62
+ with :
63
+ name : packages
64
+ path : " ${{env.BUILD_PATH}}"
67
65
68
66
deploy :
69
67
runs-on : ubuntu-latest
70
68
needs : build
71
69
if : success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
72
70
73
71
steps :
74
- - name : Download Artifact
75
- uses : actions/download-artifact@v4
76
- with :
77
- name : packages
78
-
79
- - name : Publish Packages GitHub
80
- run : |
81
- for package in $(find -name "*.nupkg"); do
82
- echo "${0##*/}": Pushing $package...
83
- dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
84
- done
85
-
86
- - name : Publish Packages feedz
87
- run : |
88
- for package in $(find -name "*.nupkg"); do
89
- echo "${0##*/}": Pushing $package...
90
- dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
91
- done
92
-
93
- - name : Publish Packages Nuget
94
- if : startsWith(github.ref, 'refs/tags/v')
95
- run : |
96
- for package in $(find -name "*.nupkg"); do
97
- echo "${0##*/}": Pushing $package...
98
- dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
99
- done
100
-
72
+ - name : Download Artifact
73
+ uses : actions/download-artifact@v4
74
+ with :
75
+ name : packages
76
+
77
+ - name : Publish Packages GitHub
78
+ run : |
79
+ for package in $(find -name "*.nupkg"); do
80
+ echo "${0##*/}": Pushing $package...
81
+ dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
82
+ done
83
+
84
+ - name : Publish Packages feedz
85
+ run : |
86
+ for package in $(find -name "*.nupkg"); do
87
+ echo "${0##*/}": Pushing $package...
88
+ dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
89
+ done
90
+
91
+ - name : Publish Packages Nuget
92
+ if : startsWith(github.ref, 'refs/tags/v')
93
+ run : |
94
+ for package in $(find -name "*.nupkg"); do
95
+ echo "${0##*/}": Pushing $package...
96
+ dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
97
+ done
0 commit comments