Skip to content

Commit ecd0d19

Browse files
committed
Add GitHub Actions workflow for NuGet package release
1 parent 16bf3c6 commit ecd0d19

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: SOFTURE COMMON CQRS - RELEASE NEW VERSION TO NUGET.ORG
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
publishing:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: ⚙️ Install dotnet
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: 9.0.100
18+
19+
- name: 🔗 Restore dependencies
20+
run: dotnet restore ./API
21+
22+
- name: 📂 Create new nuget package
23+
run: dotnet pack --no-restore -c Release -o ./artifacts /p:PackageVersion=${{ github.ref_name }} /p:Version=${{ github.ref_name }} ./API/SOFTURE.Common.CQRS/SOFTURE.Common.CQRS.csproj
24+
continue-on-error: false
25+
26+
- name: 🚀 Push new nuget package
27+
run: dotnet nuget push ./artifacts/SOFTURE.Common.CQRS.${{ github.ref_name }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)