-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.33 KB
/
publish-aspnetcore-pkg.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
name: Publish Adom.Framework.AspNetCore Nuget package
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: NerdbankGitVersioning
uses: dotnet/nbgv@v0.4.0
id: nbgv
with:
# The path to the directory for which the version should be determined. This should be at or below the directory containing the version.json file. Default is repo root directory.
path: .
- name: Build with dotnet
run: dotnet build Adom.Framework/src/Adom.Framework.AspNetCore/Adom.Framework.AspNetCore.csproj --configuration Release
- name: Pack with dotnet
run: |
dotnet pack Adom.Framework/src/Adom.Framework.AspNetCore/Adom.Framework.AspNetCore.csproj --output nuget-packages --configuration Release -p:Version=${{ steps.nbgv.outputs.SemVer2 }}
ls -l
cd nuget-packages
ls -l
cd ..\
- name: Push generated package to Nuget
if: github.ref == 'refs/heads/main'
run: dotnet nuget push nuget-packages/Adom.Framework.AspNetCore*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json