-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (45 loc) · 2.17 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and Publish Papst.EventStore
on:
push:
branches:
- main
jobs:
build-and-publish:
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.x'
- name: Setup Nerdbank.GitVersioning
run: dotnet tool install -g nbgv
- name: Use Nerdbank.GitVersioning to get version
run: nbgv get-version
- name: Restore dependencies
run: dotnet restore
- name: Build solution
run: dotnet build --no-restore --configuration Release
- name: Run tests
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Pack Papst.EventStore project
run: dotnet pack src/Papst.EventStore/Papst.EventStore.csproj --no-build --configuration Release --output ./artifacts
- name: Pack Papst.EventStore project
run: dotnet pack src/Papst.EventStore.Aggregation.EventRegistration/Papst.EventStore.Aggregation.EventRegistration.csproj --no-build --configuration Release --output ./artifacts
- name: Pack Papst.EventStore project
run: dotnet pack src/Papst.EventStore.CodeGeneration/Papst.EventStore.CodeGeneration.csproj --no-build --configuration Release --output ./artifacts
- name: Pack Papst.EventStore project
run: dotnet pack src/Papst.EventStore.AzureCosmos/Papst.EventStore.AzureCosmos.csproj --no-build --configuration Release --output ./artifacts
- name: Pack Papst.EventStore project
run: dotnet pack src/Papst.EventStore.EntityFrameworkCore/Papst.EventStore.EntityFrameworkCore.csproj --no-build --configuration Release --output ./artifacts
- name: Pack Papst.EventStore project
run: dotnet pack src/Papst.EventStore.FileSystem/Papst.EventStore.FileSystem.csproj --no-build --configuration Release --output ./artifacts
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_APIKEY }}
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}