This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
160 lines (137 loc) · 6.03 KB
/
test-publish.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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Test and Publish
on:
push:
branches:
- dev
jobs:
test:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.x.x
- name: Test Projects
run: |
dotnet test tests/Flandre.Core.Tests/ --collect "XPlat Code Coverage" --results-directory code-coverage/
dotnet test tests/Flandre.Framework.Tests/ --collect "XPlat Code Coverage" --results-directory code-coverage/
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./code-coverage/
publish:
name: Publish NuGet Packages
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.x.x
- name: Publish Core
id: publish-core
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Core/Flandre.Core.csproj
PACKAGE_NAME: Flandre.Core
VERSION_FILE_PATH: src/Flandre.Core/Flandre.Core.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Framework
id: publish-fx
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Framework/Flandre.Framework.csproj
PACKAGE_NAME: Flandre.Framework
VERSION_FILE_PATH: src/Flandre.Framework/Flandre.Framework.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: true
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# ===== Adapters =====
- name: Publish Adapters.Konata
id: publish-adapter-konata
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Adapters.Konata/Flandre.Adapters.Konata.csproj
PACKAGE_NAME: Flandre.Adapters.Konata
VERSION_FILE_PATH: src/Flandre.Adapters.Konata/Flandre.Adapters.Konata.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Adapters.OneBot
id: publish-adapter-onebot
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Adapters.OneBot/Flandre.Adapters.OneBot.csproj
PACKAGE_NAME: Flandre.Adapters.OneBot
VERSION_FILE_PATH: src/Flandre.Adapters.OneBot/Flandre.Adapters.OneBot.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Adapters.Discord
id: publish-adapter-discord
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Adapters.Discord/Flandre.Adapters.Discord.csproj
PACKAGE_NAME: Flandre.Adapters.Discord
VERSION_FILE_PATH: src/Flandre.Adapters.Discord/Flandre.Adapters.Discord.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Adapters.Mock
id: publish-adapter-mock
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Adapters.Mock/Flandre.Adapters.Mock.csproj
PACKAGE_NAME: Flandre.Adapters.Mock
VERSION_FILE_PATH: src/Flandre.Adapters.Mock/Flandre.Adapters.Mock.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# ===== Adapter Extensions =====
- name: Publish Adapters.Konata.Extensions
id: publish-adapter-konata-extensions
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Adapters.Konata.Extensions/Flandre.Adapters.Konata.Extensions.csproj
PACKAGE_NAME: Flandre.Adapters.Konata.Extensions
VERSION_FILE_PATH: src/Flandre.Adapters.Konata.Extensions/Flandre.Adapters.Konata.Extensions.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Adapters.OneBot.Extensions
id: publish-adapter-onebot-extensions
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Adapters.OneBot.Extensions/Flandre.Adapters.OneBot.Extensions.csproj
PACKAGE_NAME: Flandre.Adapters.OneBot.Extensions
VERSION_FILE_PATH: src/Flandre.Adapters.OneBot.Extensions/Flandre.Adapters.OneBot.Extensions.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# ===== Reactive Extensions =====
- name: Publish Core.Reactive
id: publish-core-rx
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Core.Reactive/Flandre.Core.Reactive.csproj
PACKAGE_NAME: Flandre.Core.Reactive
VERSION_FILE_PATH: src/Flandre.Core.Reactive/Flandre.Core.Reactive.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Framework.Reactive
id: publish-fx-rx
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: src/Flandre.Framework.Reactive/Flandre.Framework.Reactive.csproj
PACKAGE_NAME: Flandre.Framework.Reactive
VERSION_FILE_PATH: src/Flandre.Framework.Reactive/Flandre.Framework.Reactive.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
NUGET_KEY: ${{secrets.NUGET_API_KEY}}