Skip to content

Commit 45dff16

Browse files
committed
workflow
1 parent f4323ae commit 45dff16

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/cd.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Publish Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v3
17+
with:
18+
dotnet-version: '8.x'
19+
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
23+
- name: Build project
24+
run: dotnet build --configuration Release --no-restore
25+
26+
# - name: Run tests
27+
# run: dotnet test --filter "FullyQualifiedName~MapperIA.Tests.Mappers.ClassMapper.ClassMapperTests | FullyQualifiedName~MapperIA.Tests.Mappers.PDFMapper.PDFMapperTests"
28+
29+
30+
- name: Publish to NuGet
31+
env:
32+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
33+
run: |
34+
dotnet nuget push **/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
35+

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- development
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v3
17+
with:
18+
dotnet-version: '8.x'
19+
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
23+
- name: Build project
24+
run: dotnet build --configuration Release --no-restore
25+
26+
# - name: Run tests
27+
# run: dotnet test --filter "FullyQualifiedName~MapperIA.Tests.Mappers.ClassMapper.ClassMapperTests | FullyQualifiedName~MapperIA.Tests.Mappers.PDFMapper.PDFMapperTests"
28+
29+

0 commit comments

Comments
 (0)