Skip to content

Commit a612f02

Browse files
committed
pipline
1 parent da51ec3 commit a612f02

File tree

2 files changed

+60
-44
lines changed

2 files changed

+60
-44
lines changed

.github/workflows/dotnet.yml

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,39 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
812

913
jobs:
10-
build:
11-
12-
runs-on: windows-latest
13-
14+
15+
build-and-test:
16+
runs-on: ubuntu-latest
1417
steps:
15-
- uses: actions/checkout@v3
16-
- name: Setup .NET
17-
uses: actions/setup-dotnet@v3
18-
with:
19-
dotnet-version: 7.0.x
20-
21-
- name: Restore dependencies
22-
run: dotnet restore
23-
- name: Build
24-
run: dotnet build --no-restore
25-
- name: Test
26-
run: dotnet test --no-build --verbosity normal
18+
- uses: actions/checkout@v3
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 7.0.x
23+
24+
# run build and test
25+
- name: Restore dependencies
26+
run: dotnet restore
27+
- name: Build
28+
run: dotnet build --no-restore
29+
- name: Test
30+
run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=ManagedCode.Repository.Tests/lcov.info
31+
32+
#- name: coverlet
33+
# uses: b3b00/coverlet-action@1.1.9
34+
# with:
35+
# testProject: 'ManagedCode.Database.Tests/ManagedCode.Database.Tests.csproj'
36+
# output: 'lcov.info'
37+
# outputFormat: 'lcov'
38+
# excludes: '[program]*,[test]test.*'
39+
#- name: coveralls
40+
# uses: coverallsapp/github-action@master
41+
# with:
42+
# github-token: ${{secrets.GITHUB_TOKEN }}
43+
# path-to-lcov: ManagedCode.Storage.Tests/lcov.info

.github/workflows/nuget.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@ name: nuget
33
on:
44
push:
55
branches: [ main ]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
69

710
jobs:
8-
build:
11+
nuget-pack:
912

10-
runs-on: macos-latest
13+
runs-on: ubuntu-latest
1114

1215
steps:
13-
- uses: actions/checkout@v3
14-
- name: Setup .NET
15-
uses: actions/setup-dotnet@v3
16-
with:
17-
dotnet-version: 7.0.x
18-
19-
- name: Restore dependencies
20-
run: dotnet restore
21-
- name: Build
22-
run: dotnet build --no-restore
23-
- name: Test
24-
run: dotnet test --no-build --verbosity normal
25-
26-
- name: Publish Repository.Core to NuGet
27-
uses: brandedoutcast/publish-nuget@v2.5.5
28-
with:
29-
PROJECT_FILE_PATH: ManagedCode.Identity.Core/ManagedCode.Identity.Core.csproj
30-
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>
31-
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
32-
33-
34-
35-
36-
37-
38-
16+
- uses: actions/checkout@v3
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v3
19+
with:
20+
dotnet-version: 7.0.x
21+
22+
- name: Restore dependencies
23+
run: dotnet restore
24+
- name: Build
25+
run: dotnet build --configuration Release
26+
# - name: Test
27+
# run: dotnet test --configuration Release
28+
- name: Pack
29+
run: dotnet pack -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --configuration Release
30+
31+
- name: publish nuget packages
32+
run: |
33+
shopt -s globstar
34+
for file in **/*.nupkg
35+
do
36+
dotnet nuget push "$file" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
37+
done

0 commit comments

Comments
 (0)