-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (28 loc) · 1.36 KB
/
main.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
name: Publish Project
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./src
- name: Build
run: dotnet build ./src -c Release --no-restore
- name: Create Nuget Package - Analyzers
run: dotnet pack -c Release --version-suffix '' /p:Version=${{github.event.release.tag_name}} /p:PackageReleaseNotes="See https://github.com/ShaharPrishMSFT/SubtleEngineering/releases/tag/${{github.event.release.tag_name}}" ./src/SubtleEngineering.Analyzers
- name: Create Nuget Package - Decorators
run: dotnet pack -c Release --version-suffix '' /p:Version=${{github.event.release.tag_name}} /p:PackageReleaseNotes="See https://github.com/ShaharPrishMSFT/SubtleEngineering/releases/tag/${{github.event.release.tag_name}}" ./src/SubtleEngineering.Analyzers.Decorators
- name: Archive Nuget Package for Project
uses: actions/upload-artifact@v4
with:
name: packages
path: "./src/**/bin/Release/*.nupkg"
- name: Publish Nuget Package
run: dotnet nuget push ./src/**/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate