-
Notifications
You must be signed in to change notification settings - Fork 2
242 lines (203 loc) · 10.1 KB
/
release.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# Release
name: release
on:
workflow_dispatch:
push:
branches: [ release ] # this workflow publishes to nuget, ONLY run it on a PUSH (no PRs)
jobs:
build_pixata:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '2.1.x'
- name: Setup .NET Core 7
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '7.0'
# ***************** BUILDS **************** #
# Pixata.Blazor
- name: Restore - Pixata.Blazor Dependencies
run: dotnet restore Pixata.Blazor/Pixata.Blazor.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.csproj
run: dotnet build Pixata.Blazor/Pixata.Blazor.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Blazor.TelerikComponents
- name: Restore - Pixata.Blazor.TelerikComponents Dependencies
run: dotnet restore Pixata.Blazor.TelerikComponents/Pixata.Blazor.TelerikComponents.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.TelerikComponents.csproj
run: dotnet build Pixata.Blazor.TelerikComponents/Pixata.Blazor.TelerikComponents.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Blazor.LanguageExtComponents
- name: Restore - Pixata.Blazor.LanguageExtComponents Dependencies
run: dotnet restore Pixata.Blazor.LanguageExtComponents/Pixata.Blazor.LanguageExtComponents.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.LanguageExtComponents.csproj
run: dotnet build Pixata.Blazor.LanguageExtComponents/Pixata.Blazor.LanguageExtComponents.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Blazor.Sample
- name: Restore - Pixata.Blazor.Sample Dependencies
run: dotnet restore Pixata.Blazor.Sample/Pixata.Blazor.Sample.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.Sample
run: dotnet build Pixata.Blazor.Sample/Pixata.Blazor.Sample.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Extensions
- name: Restore - Pixata.Extensions Dependencies
run: dotnet restore Pixata.Extensions/Pixata.Extensions.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Extensions.csproj
run: dotnet build Pixata.Extensions/Pixata.Extensions.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Email
- name: Restore - Pixata.Email Dependencies
run: dotnet restore Pixata.Email/Pixata.Email.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Email.csproj
run: dotnet build Pixata.Email/Pixata.Email.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Functional
- name: Restore - Pixata.Functional Dependencies
run: dotnet restore Pixata.Functional/Pixata.Functional.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Functional.csproj
run: dotnet build Pixata.Functional/Pixata.Functional.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.SimilarityChooser
- name: Restore - Pixata.SimilarityChooser Dependencies
run: dotnet restore Pixata.SimilarityChooser/Pixata.SimilarityChooser.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.SimilarityChooser.csproj
run: dotnet build Pixata.SimilarityChooser/Pixata.SimilarityChooser.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Google
- name: Restore - Pixata.Google Dependencies
run: dotnet restore Pixata.Google/Pixata.Google.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Google.csproj
run: dotnet build Pixata.Google/Pixata.Google.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Extensions.Tests
- name: Restore - Pixata.Extensions.Tests Dependencies
run: dotnet restore Pixata.Extensions.Tests/Pixata.Extensions.Tests.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Extensions.Tests
run: dotnet build Pixata.Extensions.Tests/Pixata.Extensions.Tests.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# ***************** TESTS **************** #
- name: Run Tests
run: dotnet test --verbosity normal
# ***************** PUBLISHING **************** #
- name: Publish Pixata.Blazor
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Blazor/Pixata.Blazor.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Blazor.TelerikComponents
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Blazor.TelerikComponents/Pixata.Blazor.TelerikComponents.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Blazor.LanguageExtComponents
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Blazor.LanguageExtComponents/Pixata.Blazor.LanguageExtComponents.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Extensions
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Extensions/Pixata.Extensions.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Email
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Email/Pixata.Email.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Functional
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Functional/Pixata.Functional.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.SimilarityChooser
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.SimilarityChooser/Pixata.SimilarityChooser.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Google
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Google/Pixata.Google.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# *** Publish Pixata.Blazor.Sample ***
- name: Rename _app_offline.htm to app_offline.htm to stop the site
shell: python
run: |
import ftplib
with ftplib.FTP('${{ secrets.PIXATATESTFTPSERVER }}') as ftp:
ftp.login('${{ secrets.PIXATATESTFTPUSER }}', '${{ secrets.PIXATATESTFTPPASSWORD }}')
ftp.rename('_app_offline.htm', 'app_offline.htm')
ftp.quit()
- name: Publish Pixata.Blazor.Sample
run: dotnet publish Pixata.Blazor.Sample\Pixata.Blazor.Sample.csproj --framework net7.0 --output Pixata.Blazor.Sample.Publish
- name: Deploy Pixata.Blazor.Sample
uses: SamKirkland/FTP-Deploy-Action@4.0.0
with:
server: ${{ secrets.PIXATATESTFTPSERVER }}
username: ${{ secrets.PIXATATESTFTPUSER }}
password: ${{ secrets.PIXATATESTFTPPASSWORD }}
local-dir: ./Pixata.Blazor.Sample.Publish/
- name: Rename app_offline.htm back to _app_offline.htm to start the site
shell: python
run: |
import ftplib
with ftplib.FTP('${{ secrets.PIXATATESTFTPSERVER }}') as ftp:
ftp.login('${{ secrets.PIXATATESTFTPUSER }}', '${{ secrets.PIXATATESTFTPPASSWORD }}')
ftp.rename('app_offline.htm', '_app_offline.htm')
ftp.quit()