-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 873 Bytes
/
publish.yml
File metadata and controls
31 lines (27 loc) · 873 Bytes
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
name: Publish Package to Nuget.org
on:
push:
tags:
- "*"
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
folder: [Foundation.Clients, Foundation.SourceClients]
steps:
# Checking out repository
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
# pack file to publish to NuGet
- name: Create a NuGet Package 🔧
run: |
cd ${{matrix.folder}}
dotnet pack --configuration Release -p:PackageVersion=${{ github.ref_name}} -o .
# Publishing with tag name as version
- name: Publishing to NuGet 🚀
run: |
cd ${{matrix.folder}}
dotnet nuget push ${{matrix.folder}}.${{ github.ref_name}}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json