-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (68 loc) · 3.23 KB
/
publish.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Publish Nuget Packages
on:
push:
tags:
- '*.*.**'
jobs:
publish_nuget_package:
name: Publish SSync Client and Server
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
# project ssync client
- uses: actions/checkout@v4
- name: Set Version Client
run: |
sed -i -e 's/{{Version}}/${{github.ref_name}}/' ./src/SSync.Client.LitebDB/SSync.Client.LitebDB.csproj
- name: Restore Client
run: dotnet restore ./src/SSync.Client.LitebDB/SSync.Client.LitebDB.csproj
- name: Build Client
run: dotnet build --no-restore ./src/SSync.Client.LitebDB/SSync.Client.LitebDB.csproj
- name: Test Client
run: dotnet test --no-build --verbosity normal ./src/SSync.Client.LitebDB/SSync.Client.LitebDB.csproj
- name: Pack Client
run: |
dotnet pack ./src/SSync.Client.LitebDB/SSync.Client.LitebDB.csproj -c Release -o output-client
- name: Publish Client to Nuget.Org
run: |
dotnet nuget push output-client/*.nupkg -k ${{ secrets.NUGET_API_KEY_CLIENT }} -s https://api.nuget.org/v3/index.json --skip-duplicate
# end project ssync client
# project ssync server
- uses: actions/checkout@v4
- name: Set Version Server
run: |
sed -i -e 's/{{Version}}/${{github.ref_name}}/' ./src/SSync.Server.LitebDB/SSync.Server.LitebDB.csproj
- name: Restore Server
run: dotnet restore ./src/SSync.Server.LitebDB/SSync.Server.LitebDB.csproj
- name: Build Server
run: dotnet build --no-restore ./src/SSync.Server.LitebDB/SSync.Server.LitebDB.csproj
- name: Test Server
run: dotnet test --no-build --verbosity normal ./src/SSync.Server.LitebDB/SSync.Server.LitebDB.csproj
- name: Pack Server
run: |
dotnet pack ./src/SSync.Server.LitebDB/SSync.Server.LitebDB.csproj -c Release -o output-server
- name: Publish Server to Nuget.Org
run: |
dotnet nuget push output-server/*.nupkg -k ${{ secrets.NUGET_API_KEY_SERVER }} -s https://api.nuget.org/v3/index.json --skip-duplicate
# end project ssync server
# project ssync shared client and server
- uses: actions/checkout@v4
- name: Set Version Client
run: |
sed -i -e 's/{{Version}}/${{github.ref_name}}/' ./src/SSync.Shared.ClientServer.LitebDB
- name: Restore Client
run: dotnet restore ./src/SSync.Shared.ClientServer.LitebDB
- name: Build Client
run: dotnet build --no-restore ./src/SSync.Shared.ClientServer.LitebDB
- name: Test Client
run: dotnet test --no-build --verbosity normal ./src/SSync.Shared.ClientServer.LitebDB
- name: Pack Client
run: |
dotnet pack ./src/SSync.Shared.ClientServer.LitebDB -c Release -o output-shared
- name: Publish Shared project to Nuget.Org
run: |
dotnet nuget push output-shared/*.nupkg -k ${{ secrets.NUGET_API_KEY_CLIENT }} -s https://api.nuget.org/v3/index.json --skip-duplicate
# end project ssync shared client and server