Skip to content

Commit 37d1a5b

Browse files
committed
update build
1 parent f6af112 commit 37d1a5b

File tree

2 files changed

+112
-73
lines changed

2 files changed

+112
-73
lines changed

.github/dependabot.yml

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,57 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: "01:00"
8-
open-pull-requests-limit: 10
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "01:00"
8+
timezone: "America/Chicago"
9+
open-pull-requests-limit: 10
910

10-
- package-ecosystem: nuget
11-
directory: "/"
12-
schedule:
13-
interval: daily
14-
time: "02:00"
15-
open-pull-requests-limit: 10
11+
- package-ecosystem: nuget
12+
directory: "/"
13+
schedule:
14+
interval: daily
15+
time: "02:00"
16+
timezone: "America/Chicago"
17+
open-pull-requests-limit: 10
18+
groups:
19+
Azure:
20+
patterns:
21+
- "Azure.*"
22+
- "Microsoft.Azure.*"
23+
- "Microsoft.Extensions.Azure"
24+
AspNetCoreHealthChecks:
25+
patterns:
26+
- "AspNetCore.HealthChecks.*"
27+
AspNetCore:
28+
patterns:
29+
- "Microsoft.AspNetCore.*"
30+
- "Microsoft.Extensions.Features"
31+
MicrosoftExtensions:
32+
patterns:
33+
- "Microsoft.Extensions.*"
34+
EntityFrameworkCore:
35+
patterns:
36+
- "Microsoft.EntityFrameworkCore.*"
37+
OpenTelemetry:
38+
patterns:
39+
- "OpenTelemetry.*"
40+
Serilog:
41+
patterns:
42+
- "Serilog"
43+
- "Serilog.*"
44+
Hangfire:
45+
patterns:
46+
- "Hangfire"
47+
- "Hangfire.*"
48+
Testcontainers:
49+
patterns:
50+
- "Testcontainers.*"
51+
xUnit:
52+
patterns:
53+
- "xunit"
54+
- "xunit.assert"
55+
- "xunit.core"
56+
- "xunit.extensibility.*"
57+
- "xunit.runner.*"

.github/workflows/dotnet.yml

Lines changed: 58 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build
33
env:
44
DOTNET_NOLOGO: true
55
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
6-
BUILD_PATH: '${{github.workspace}}/artifacts'
6+
BUILD_PATH: "${{github.workspace}}/artifacts"
77
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
88

99
on:
@@ -12,89 +12,86 @@ on:
1212
- master
1313
- develop
1414
tags:
15-
- 'v*'
15+
- "v*"
1616
pull_request:
1717
branches:
1818
- master
1919
- develop
2020

2121
jobs:
22-
2322
build:
2423
runs-on: ubuntu-latest
2524

2625
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:
3534
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
4238
43-
- name: Build Solution
44-
run: dotnet build --no-restore --configuration Release
39+
- name: Restore Dependencies
40+
run: dotnet restore
4541

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
4844

45+
- name: Run Test
46+
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
4947

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:
5452
file: "${{github.workspace}}/test/*/TestResults/*/coverage.info"
5553
format: lcov
5654

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}}"
6058

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}}"
6765

6866
deploy:
6967
runs-on: ubuntu-latest
7068
needs: build
7169
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
7270

7371
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

Comments
 (0)