-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.08 KB
/
publish-to-nuget.yml
File metadata and controls
36 lines (31 loc) · 1.08 KB
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
name: Publish Package to Nuget.org
on:
workflow_call:
secrets:
NUGET_API_KEY:
required: true
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
folder: [Bones, Bones.Akka, Bones.Akka.Tests, Bones.AspNetCore, Bones.Converters, Bones.Flow, Bones.Grpc, Bones.Selectors, Bones.Tests, Bones.X509, Bones.Akka.Monitoring, Bones.Monitoring]
steps:
# Checking out repository
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: Setup .NET 10.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
# pack file to publish to NuGet
- name: Create a NuGet Package 🔧
run: |
cd src/${{matrix.folder}}
export VERSION=${{ github.ref_name }}
dotnet pack
# Publishing with tag name as version
- name: Publishing to NuGet 🚀
run: |
cd src/${{ matrix.folder}}/bin/Release
dotnet nuget push ${{matrix.folder}}.${{ github.ref_name}}.nupkg -k ${{ secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json