-
-
Notifications
You must be signed in to change notification settings - Fork 21
51 lines (37 loc) · 1.52 KB
/
publish_nuget.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: Publish Nugets
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Setup .NET 8
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
- name: Pack Weasel.Core
run: dotnet pack ./src/Weasel.Core/Weasel.Core.csproj -o ./artifacts --configuration Release --no-build
- name: Pack Weasel.Postgresql
run: dotnet pack ./src/Weasel.Postgresql/Weasel.Postgresql.csproj -o ./artifacts --configuration Release --no-build
- name: Pack Weasel.SqlServer
run: dotnet pack ./src/Weasel.SqlServer/Weasel.SqlServer.csproj -o ./artifacts --configuration Release --no-build
- name: Pack Weasel.CommandLine
run: dotnet pack ./src/Weasel.CommandLine/Weasel.CommandLine.csproj -o ./artifacts --configuration Release --no-build
- name: Publish to NuGet
run: |
find . -name '*.nupkg' -exec dotnet nuget push "{}" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate \;
# find . -name '*.snupkg' -exec dotnet nuget push "{}" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} \;
shell: bash