-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (32 loc) · 1.38 KB
/
cd.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
name: Publish Packages
on:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
# Pack packages
- name: Pack Spoleto.VirtualKassa.MultiBank
run: dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release src/Spoleto.VirtualKassa.MultiBank/Spoleto.VirtualKassa.MultiBank.csproj -o .
- name: Pack Spoleto.VirtualKassa.MultiBank.Extensions
run: dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release src/Spoleto.VirtualKassa.MultiBank.Extensions/Spoleto.VirtualKassa.MultiBank.Extensions.csproj -o .
# Push packages to Nuget
- name: Push packages
run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate
# Upload packages as release assets
- name: Upload assets to release
run: |
chmod +x ./publish-assets-to-github.sh
./publish-assets-to-github.sh ${{ github.event.release.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}