-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (40 loc) · 1.6 KB
/
release.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
48
49
50
51
name: Build, Package & Release MultiTenant.AspNetCore library
on:
release:
types: [published]
jobs:
build:
name: Build MultiTenant.AspNetCore library
runs-on: ubuntu-latest
steps:
- name: 📄 Checkout
uses: actions/checkout@v3
- name: 🛠️ Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: 🛠️ Restore NuGet packages
run: dotnet restore
- name: 🚀 Build Solution
run: dotnet build --configuration Release
- name: 👟 Run tests
run: dotnet test
- name: 📦 Pack NuGet package
run: dotnet pack -p VersionPrefix=${{github.event.release.tag_name}} -p ReleaseNotes="${{github.event.release.body}}" --configuration Release
- name: 💾 Archive package
uses: actions/upload-artifact@v3
with:
name: nuget-package
path: /home/runner/work/MultiTenant.AspNetCore/MultiTenant.AspNetCore/src/bin/Release/MultiTenant.AspNetCore.*.nupkg
- name: 💾 Archive symbols package
uses: actions/upload-artifact@v3
with:
name: nuget-package
path: /home/runner/work/MultiTenant.AspNetCore/MultiTenant.AspNetCore/src/bin/Release/MultiTenant.AspNetCore.*.snupkg
- name: 🛠️ Setup NuGet
uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '5.x'
- name: 🌐 Push NuGet package live
run: nuget push /home/runner/work/MultiTenant.AspNetCore/MultiTenant.AspNetCore/src/bin/Release/MultiTenant.AspNetCore.*.nupkg -src https://api.nuget.org/v3/index.json