-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (34 loc) · 1.55 KB
/
Copy pathcd.yml
File metadata and controls
46 lines (34 loc) · 1.55 KB
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
name: Publish Packages
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
# Pack packages
- name: Pack Spoleto.DataBus.Interfaces
run: dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release src/Spoleto.DataBus.Interfaces/Spoleto.DataBus.Interfaces.csproj -o .
- name: Pack Spoleto.DataBus.SMS
run: dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release src/Connectors/SMS/Spoleto.DataBus.SMS/Spoleto.DataBus.SMS.csproj -o .
- name: Pack Spoleto.DataBus.SMS.Interfaces
run: dotnet pack --include-symbols -p:SymbolPackageFormat=snupkg --no-build -c Release src/Connectors/SMS/Spoleto.DataBus.SMS.Interfaces/Spoleto.DataBus.SMS.Interfaces.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 }}