-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (37 loc) · 1.39 KB
/
dotnet-package.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
name: EventHorizon Nuget Packages
on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize]
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/[email protected]
with:
additionalArguments: '/updateAssemblyInfo'
- run: |
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.NuGetVersionV2 }}"
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install .NET Workloads
run: dotnet workload install wasm-tools
- name: Build with dotnet
run: dotnet build --configuration Release ./EventHorizon.Blazor.Interop/EventHorizon.Blazor.Interop.csproj
- name: Pack with dotnet
run: dotnet pack EventHorizon.Blazor.Interop/EventHorizon.Blazor.Interop.csproj --output nuget-packages --configuration Release -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersionV2 }}
- name: Push with dotnet
run: dotnet nuget push nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json