Skip to content

Commit bf98a73

Browse files
authored
Update default plugin publish to follow production version (#3656)
1 parent 3680440 commit bf98a73

File tree

1 file changed

+17
-68
lines changed

1 file changed

+17
-68
lines changed

.github/workflows/default_plugins.yml

Lines changed: 17 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ name: Publish Default Plugins
33
on:
44
push:
55
branches: ['master']
6-
paths: ['Plugins/**']
76
workflow_dispatch:
87

98
jobs:
10-
build:
9+
publish:
1110
runs-on: windows-latest
1211

1312
steps:
@@ -17,54 +16,37 @@ jobs:
1716
with:
1817
dotnet-version: 7.0.x
1918

20-
- name: Determine New Plugin Updates
21-
uses: dorny/paths-filter@v3
22-
id: changes
23-
with:
24-
filters: |
25-
browserbookmark:
26-
- 'Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json'
27-
calculator:
28-
- 'Plugins/Flow.Launcher.Plugin.Calculator/plugin.json'
29-
explorer:
30-
- 'Plugins/Flow.Launcher.Plugin.Explorer/plugin.json'
31-
pluginindicator:
32-
- 'Plugins/Flow.Launcher.Plugin.PluginIndicator/plugin.json'
33-
pluginsmanager:
34-
- 'Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json'
35-
processkiller:
36-
- 'Plugins/Flow.Launcher.Plugin.ProcessKiller/plugin.json'
37-
program:
38-
- 'Plugins/Flow.Launcher.Plugin.Program/plugin.json'
39-
shell:
40-
- 'Plugins/Flow.Launcher.Plugin.Shell/plugin.json'
41-
sys:
42-
- 'Plugins/Flow.Launcher.Plugin.Sys/plugin.json'
43-
url:
44-
- 'Plugins/Flow.Launcher.Plugin.Url/plugin.json'
45-
websearch:
46-
- 'Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json'
47-
windowssettings:
48-
- 'Plugins/Flow.Launcher.Plugin.WindowsSettings/plugin.json'
49-
base: 'master'
19+
- name: Update Plugins To Production Version
20+
run: |
21+
$version = "1.0.0"
22+
Get-Content appveyor.yml | ForEach-Object {
23+
if ($_ -match "version:\s*'(\d+\.\d+\.\d+)\.") {
24+
$version = $matches[1]
25+
}
26+
}
27+
28+
$jsonFiles = Get-ChildItem -Path ".\Plugins\*\plugin.json"
29+
foreach ($file in $jsonFiles) {
30+
$plugin_old_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json
31+
(Get-Content $file) -replace '"Version"\s*:\s*".*?"', "`"Version`": `"$version`"" | Set-Content $file
32+
$plugin_new_ver = Get-Content $file.FullName -Raw | ConvertFrom-Json
33+
Write-Host "Updated" $plugin_old_ver.Name "version from" $plugin_old_ver.Version "to" $plugin_new_ver.Version
34+
}
5035
5136
- name: Get BrowserBookmark Version
52-
if: steps.changes.outputs.browserbookmark == 'true'
5337
id: updated-version-browserbookmark
5438
uses: notiz-dev/github-action-json-property@release
5539
with:
5640
path: 'Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json'
5741
prop_path: 'Version'
5842

5943
- name: Build BrowserBookmark
60-
if: steps.changes.outputs.browserbookmark == 'true'
6144
run: |
6245
dotnet publish 'Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.BrowserBookmark"
6346
7z a -tzip "Flow.Launcher.Plugin.BrowserBookmark.zip" "./Flow.Launcher.Plugin.BrowserBookmark/*"
6447
rm -r "Flow.Launcher.Plugin.BrowserBookmark"
6548
6649
- name: Publish BrowserBookmark
67-
if: steps.changes.outputs.browserbookmark == 'true'
6850
uses: softprops/action-gh-release@v2
6951
with:
7052
repository: "Flow-Launcher/Flow.Launcher.Plugin.BrowserBookmark"
@@ -76,22 +58,19 @@ jobs:
7658

7759

7860
- name: Get Calculator Version
79-
if: steps.changes.outputs.calculator == 'true'
8061
id: updated-version-calculator
8162
uses: notiz-dev/github-action-json-property@release
8263
with:
8364
path: 'Plugins/Flow.Launcher.Plugin.Calculator/plugin.json'
8465
prop_path: 'Version'
8566

8667
- name: Build Calculator
87-
if: steps.changes.outputs.calculator == 'true'
8868
run: |
8969
dotnet publish 'Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.Calculator"
9070
7z a -tzip "Flow.Launcher.Plugin.Calculator.zip" "./Flow.Launcher.Plugin.Calculator/*"
9171
rm -r "Flow.Launcher.Plugin.Calculator"
9272
9373
- name: Publish Calculator
94-
if: steps.changes.outputs.calculator == 'true'
9574
uses: softprops/action-gh-release@v2
9675
with:
9776
repository: "Flow-Launcher/Flow.Launcher.Plugin.Calculator"
@@ -103,22 +82,19 @@ jobs:
10382

10483

10584
- name: Get Explorer Version
106-
if: steps.changes.outputs.explorer == 'true'
10785
id: updated-version-explorer
10886
uses: notiz-dev/github-action-json-property@release
10987
with:
11088
path: 'Plugins/Flow.Launcher.Plugin.Explorer/plugin.json'
11189
prop_path: 'Version'
11290

11391
- name: Build Explorer
114-
if: steps.changes.outputs.explorer == 'true'
11592
run: |
11693
dotnet publish 'Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.Explorer"
11794
7z a -tzip "Flow.Launcher.Plugin.Explorer.zip" "./Flow.Launcher.Plugin.Explorer/*"
11895
rm -r "Flow.Launcher.Plugin.Explorer"
11996
12097
- name: Publish Explorer
121-
if: steps.changes.outputs.explorer == 'true'
12298
uses: softprops/action-gh-release@v2
12399
with:
124100
repository: "Flow-Launcher/Flow.Launcher.Plugin.Explorer"
@@ -130,22 +106,19 @@ jobs:
130106

131107

132108
- name: Get PluginIndicator Version
133-
if: steps.changes.outputs.pluginindicator == 'true'
134109
id: updated-version-pluginindicator
135110
uses: notiz-dev/github-action-json-property@release
136111
with:
137112
path: 'Plugins/Flow.Launcher.Plugin.PluginIndicator/plugin.json'
138113
prop_path: 'Version'
139114

140115
- name: Build PluginIndicator
141-
if: steps.changes.outputs.pluginindicator == 'true'
142116
run: |
143117
dotnet publish 'Plugins/Flow.Launcher.Plugin.PluginIndicator/Flow.Launcher.Plugin.PluginIndicator.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.PluginIndicator"
144118
7z a -tzip "Flow.Launcher.Plugin.PluginIndicator.zip" "./Flow.Launcher.Plugin.PluginIndicator/*"
145119
rm -r "Flow.Launcher.Plugin.PluginIndicator"
146120
147121
- name: Publish PluginIndicator
148-
if: steps.changes.outputs.pluginindicator == 'true'
149122
uses: softprops/action-gh-release@v2
150123
with:
151124
repository: "Flow-Launcher/Flow.Launcher.Plugin.PluginIndicator"
@@ -157,22 +130,19 @@ jobs:
157130

158131

159132
- name: Get PluginsManager Version
160-
if: steps.changes.outputs.pluginsmanager == 'true'
161133
id: updated-version-pluginsmanager
162134
uses: notiz-dev/github-action-json-property@release
163135
with:
164136
path: 'Plugins/Flow.Launcher.Plugin.PluginsManager/plugin.json'
165137
prop_path: 'Version'
166138

167139
- name: Build PluginsManager
168-
if: steps.changes.outputs.pluginsmanager == 'true'
169140
run: |
170141
dotnet publish 'Plugins/Flow.Launcher.Plugin.PluginsManager/Flow.Launcher.Plugin.PluginsManager.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.PluginsManager"
171142
7z a -tzip "Flow.Launcher.Plugin.PluginsManager.zip" "./Flow.Launcher.Plugin.PluginsManager/*"
172143
rm -r "Flow.Launcher.Plugin.PluginsManager"
173144
174145
- name: Publish PluginsManager
175-
if: steps.changes.outputs.pluginsmanager == 'true'
176146
uses: softprops/action-gh-release@v2
177147
with:
178148
repository: "Flow-Launcher/Flow.Launcher.Plugin.PluginsManager"
@@ -184,22 +154,19 @@ jobs:
184154

185155

186156
- name: Get ProcessKiller Version
187-
if: steps.changes.outputs.processkiller == 'true'
188157
id: updated-version-processkiller
189158
uses: notiz-dev/github-action-json-property@release
190159
with:
191160
path: 'Plugins/Flow.Launcher.Plugin.ProcessKiller/plugin.json'
192161
prop_path: 'Version'
193162

194163
- name: Build ProcessKiller
195-
if: steps.changes.outputs.processkiller == 'true'
196164
run: |
197165
dotnet publish 'Plugins/Flow.Launcher.Plugin.ProcessKiller/Flow.Launcher.Plugin.ProcessKiller.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.ProcessKiller"
198166
7z a -tzip "Flow.Launcher.Plugin.ProcessKiller.zip" "./Flow.Launcher.Plugin.ProcessKiller/*"
199167
rm -r "Flow.Launcher.Plugin.ProcessKiller"
200168
201169
- name: Publish ProcessKiller
202-
if: steps.changes.outputs.processkiller == 'true'
203170
uses: softprops/action-gh-release@v2
204171
with:
205172
repository: "Flow-Launcher/Flow.Launcher.Plugin.ProcessKiller"
@@ -211,22 +178,19 @@ jobs:
211178

212179

213180
- name: Get Program Version
214-
if: steps.changes.outputs.program == 'true'
215181
id: updated-version-program
216182
uses: notiz-dev/github-action-json-property@release
217183
with:
218184
path: 'Plugins/Flow.Launcher.Plugin.Program/plugin.json'
219185
prop_path: 'Version'
220186

221187
- name: Build Program
222-
if: steps.changes.outputs.program == 'true'
223188
run: |
224189
dotnet publish 'Plugins/Flow.Launcher.Plugin.Program/Flow.Launcher.Plugin.Program.csproj' --framework net7.0-windows10.0.19041.0 -c Release -o "Flow.Launcher.Plugin.Program"
225190
7z a -tzip "Flow.Launcher.Plugin.Program.zip" "./Flow.Launcher.Plugin.Program/*"
226191
rm -r "Flow.Launcher.Plugin.Program"
227192
228193
- name: Publish Program
229-
if: steps.changes.outputs.program == 'true'
230194
uses: softprops/action-gh-release@v2
231195
with:
232196
repository: "Flow-Launcher/Flow.Launcher.Plugin.Program"
@@ -238,22 +202,19 @@ jobs:
238202

239203

240204
- name: Get Shell Version
241-
if: steps.changes.outputs.shell == 'true'
242205
id: updated-version-shell
243206
uses: notiz-dev/github-action-json-property@release
244207
with:
245208
path: 'Plugins/Flow.Launcher.Plugin.Shell/plugin.json'
246209
prop_path: 'Version'
247210

248211
- name: Build Shell
249-
if: steps.changes.outputs.shell == 'true'
250212
run: |
251213
dotnet publish 'Plugins/Flow.Launcher.Plugin.Shell/Flow.Launcher.Plugin.Shell.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.Shell"
252214
7z a -tzip "Flow.Launcher.Plugin.Shell.zip" "./Flow.Launcher.Plugin.Shell/*"
253215
rm -r "Flow.Launcher.Plugin.Shell"
254216
255217
- name: Publish Shell
256-
if: steps.changes.outputs.shell == 'true'
257218
uses: softprops/action-gh-release@v2
258219
with:
259220
repository: "Flow-Launcher/Flow.Launcher.Plugin.Shell"
@@ -265,22 +226,19 @@ jobs:
265226

266227

267228
- name: Get Sys Version
268-
if: steps.changes.outputs.sys == 'true'
269229
id: updated-version-sys
270230
uses: notiz-dev/github-action-json-property@release
271231
with:
272232
path: 'Plugins/Flow.Launcher.Plugin.Sys/plugin.json'
273233
prop_path: 'Version'
274234

275235
- name: Build Sys
276-
if: steps.changes.outputs.sys == 'true'
277236
run: |
278237
dotnet publish 'Plugins/Flow.Launcher.Plugin.Sys/Flow.Launcher.Plugin.Sys.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.Sys"
279238
7z a -tzip "Flow.Launcher.Plugin.Sys.zip" "./Flow.Launcher.Plugin.Sys/*"
280239
rm -r "Flow.Launcher.Plugin.Sys"
281240
282241
- name: Publish Sys
283-
if: steps.changes.outputs.sys == 'true'
284242
uses: softprops/action-gh-release@v2
285243
with:
286244
repository: "Flow-Launcher/Flow.Launcher.Plugin.Sys"
@@ -292,22 +250,19 @@ jobs:
292250

293251

294252
- name: Get Url Version
295-
if: steps.changes.outputs.url == 'true'
296253
id: updated-version-url
297254
uses: notiz-dev/github-action-json-property@release
298255
with:
299256
path: 'Plugins/Flow.Launcher.Plugin.Url/plugin.json'
300257
prop_path: 'Version'
301258

302259
- name: Build Url
303-
if: steps.changes.outputs.url == 'true'
304260
run: |
305261
dotnet publish 'Plugins/Flow.Launcher.Plugin.Url/Flow.Launcher.Plugin.Url.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.Url"
306262
7z a -tzip "Flow.Launcher.Plugin.Url.zip" "./Flow.Launcher.Plugin.Url/*"
307263
rm -r "Flow.Launcher.Plugin.Url"
308264
309265
- name: Publish Url
310-
if: steps.changes.outputs.url == 'true'
311266
uses: softprops/action-gh-release@v2
312267
with:
313268
repository: "Flow-Launcher/Flow.Launcher.Plugin.Url"
@@ -319,22 +274,19 @@ jobs:
319274

320275

321276
- name: Get WebSearch Version
322-
if: steps.changes.outputs.websearch == 'true'
323277
id: updated-version-websearch
324278
uses: notiz-dev/github-action-json-property@release
325279
with:
326280
path: 'Plugins/Flow.Launcher.Plugin.WebSearch/plugin.json'
327281
prop_path: 'Version'
328282

329283
- name: Build WebSearch
330-
if: steps.changes.outputs.websearch == 'true'
331284
run: |
332285
dotnet publish 'Plugins/Flow.Launcher.Plugin.WebSearch/Flow.Launcher.Plugin.WebSearch.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.WebSearch"
333286
7z a -tzip "Flow.Launcher.Plugin.WebSearch.zip" "./Flow.Launcher.Plugin.WebSearch/*"
334287
rm -r "Flow.Launcher.Plugin.WebSearch"
335288
336289
- name: Publish WebSearch
337-
if: steps.changes.outputs.websearch == 'true'
338290
uses: softprops/action-gh-release@v2
339291
with:
340292
repository: "Flow-Launcher/Flow.Launcher.Plugin.WebSearch"
@@ -346,22 +298,19 @@ jobs:
346298

347299

348300
- name: Get WindowsSettings Version
349-
if: steps.changes.outputs.windowssettings == 'true'
350301
id: updated-version-windowssettings
351302
uses: notiz-dev/github-action-json-property@release
352303
with:
353304
path: 'Plugins/Flow.Launcher.Plugin.WindowsSettings/plugin.json'
354305
prop_path: 'Version'
355306

356307
- name: Build WindowsSettings
357-
if: steps.changes.outputs.windowssettings == 'true'
358308
run: |
359309
dotnet publish 'Plugins/Flow.Launcher.Plugin.WindowsSettings/Flow.Launcher.Plugin.WindowsSettings.csproj' --framework net7.0-windows -c Release -o "Flow.Launcher.Plugin.WindowsSettings"
360310
7z a -tzip "Flow.Launcher.Plugin.WindowsSettings.zip" "./Flow.Launcher.Plugin.WindowsSettings/*"
361311
rm -r "Flow.Launcher.Plugin.WindowsSettings"
362312
363313
- name: Publish WindowsSettings
364-
if: steps.changes.outputs.windowssettings == 'true'
365314
uses: softprops/action-gh-release@v2
366315
with:
367316
repository: "Flow-Launcher/Flow.Launcher.Plugin.WindowsSettings"

0 commit comments

Comments
 (0)