-
Notifications
You must be signed in to change notification settings - Fork 264
41 lines (35 loc) · 1.67 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
name: NuGet Generation
on:
push:
branches:
- main
pull_request:
types: [closed]
branches:
- main
jobs:
build:
runs-on: ubuntu-18.04
name: Update NuGet package
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Setup .NET Core @ Latest
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.201
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.PRACTICAL_CLEAN_DDD_TOKEN }}
- name: Build solution and generate NuGet package
run: |
printenv
echo "${{ env.GITHUB_RUN_ID}}"
dotnet pack src/BuildingBlocks/N8T.Core/N8T.Core.csproj -c Release --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID -o out
dotnet pack src/BuildingBlocks/N8T.Infrastructure/N8T.Infrastructure.csproj -c Release --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID -o out
dotnet pack src/BuildingBlocks/N8T.Infrastructure.EfCore/N8T.Infrastructure.EfCore.csproj -c Release --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID -o out
dotnet pack src/BuildingBlocks/N8T.Infrastructure.OTel/N8T.Infrastructure.OTel.csproj -c Release --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID -o out
- name: Push generated package to GitHub registry
run: dotnet nuget push /home/runner/work/practical-clean-ddd/practical-clean-ddd/out/*.nupkg --api-key ${{ secrets.PRACTICAL_CLEAN_DDD_TOKEN }} --skip-duplicate
env:
NUGET_AUTH_TOKEN: ${{ secrets.PRACTICAL_CLEAN_DDD_TOKEN }}