Skip to content

Commit a6b24df

Browse files
committed
v0.91.1
1 parent 85fc015 commit a6b24df

File tree

2 files changed

+27
-48
lines changed

2 files changed

+27
-48
lines changed
Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: sync to package repos
1+
name: Push updates to package managers
22

33
on:
44
release:
@@ -12,60 +12,39 @@ jobs:
1212
runs-on: windows-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4.1.1
16-
with:
17-
ref: chocolatey
1815

1916
- name: Config and Push
2017
run: |
2118
rm .git -Recurse -Force -Confirm:$false
22-
$response=curl.exe -s https://api.github.com/repos/lin-ycv/everythingpowertoys/releases/latest
2319
24-
$ver = ($response | select-string '"tag_name":').Line.split("`"")[3].Trim('v')
25-
26-
$zip = ($response | Where-Object { $_ -like "*x64.zip`"" } | Select-Object -Last 1).Split("`"")[3]
27-
$zipARM = ($response | Where-Object { $_ -like "*ARM64.zip`"" } | Select-Object -Last 1).Split("`"")[3]
28-
$exe = ($response | Where-Object { $_ -like "*x64.exe`"" } | Select-Object -Last 1).Split("`"")[3]
29-
$exeARM = ($response | Where-Object { $_ -like "*ARM64.exe`"" } | Select-Object -Last 1).Split("`"")[3]
30-
31-
$pattern = '(?s)(?<=<!--HASH-->).*?(?=<!--ENDHASH-->)'
32-
$hash = (($response | select-string '"body"').Line | Select-String -Pattern $pattern | ForEach-Object { $_.Matches.Value.Trim() }).Split("\r\n")
33-
$ziphash = ($hash | select-string "x64-ZIP").Line.Split('|')[1]
34-
$zipARMhash = ($hash | select-string "ARM64-ZIP").Line.Split('|')[1]
35-
$exehash = ($hash | select-string "x64-EXE").Line.Split('|')[1]
36-
$exeARMhash = ($hash | select-string "ARM64-EXE").Line.Split('|')[1]
37-
38-
# chocolatey
39-
echo $ver $zip $ziphash
40-
Get-ChildItem *.* -Recurse | ForEach { (Get-Content $_) | ForEach {$_ -Replace '_VERSION_', $ver} | ForEach {$_ -Replace '_URL_', $zip} | ForEach {$_ -Replace '_CRC_', $ziphash} | Set-Content $_ }
41-
if([System.IO.File]::Exists("$PWD\1")) { rm 1 }
42-
choco pack
43-
ls
44-
choco apikey --key ${{ secrets.CHOCOLATEY }} --source https://push.chocolatey.org/
45-
choco push everythingpowertoys.$ver.nupkg --source https://push.chocolatey.org/
20+
# Get Chocolatey manifests
21+
git clone --filter=blob:none --no-checkout --depth 1 https://github.com/lin-ycv/chocolatey-pkgs.git
22+
cd chocolatey-pkgs
23+
git sparse-checkout set --cone
24+
git sparse-checkout set .\manifests\everythingpowertoys
25+
git checkout main
4626
47-
# winget
48-
$wingetPackage = "lin-ycv.EverythingPowerToys"
49-
echo $wingetPackage $ver $exe $exehash $exeARM $exeARMhash
27+
# Use Choco-AU to get the data
28+
Install-Module Chocolatey-AU -Force
29+
cd .\manifests\everythingpowertoys
30+
$UpdateOutput = .\update.ps1
31+
echo $Latest.Version $Latest.URL64 $Latest.Checksum64 $Latest.ARM64 $Latest.Checksuma64
32+
33+
# Chocolatey: Check (and Push)
34+
$NupkgPath = (($UpdateOutput.Result | Where-Object {$_ -like '*.nupkg''*'}) -split "'")[1]
35+
if ($NupkgPath){
36+
Write-Output "Newer Version Available: push to Choco"
37+
$ApiKey = '${{ secrets.CHOCOLATEY }}'
38+
$ChocoServer = 'https://push.chocolatey.org/'
39+
choco push $NupkgPath --source $ChocoServer --key $ApiKey
40+
}
41+
cd ..\..\..
42+
43+
# Winget
5044
rm -Path .\* -Recurse -Force
5145
git clone -b winget https://github.com/lin-ycv/EverythingPowerToys.git --depth 1
5246
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
5347
cd .\EverythingPowerToys
5448
rm .git -Recurse -Force -Confirm:$false
55-
Get-ChildItem *.* -Recurse | ForEach { (Get-Content $_) | ForEach {$_ -Replace '_VERSION_', $ver} | ForEach {$_ -Replace '_URL_', $exe} | ForEach {$_ -Replace '_CRC_', $exehash} | ForEach {$_ -Replace '_armURL_', $exeARM} | ForEach {$_ -Replace '_armCRC_', $exeARMhash} | Set-Content $_ }
56-
..\wingetcreate submit -p "New version: lin-ycv.EverythingPowerToys version $ver" -t ${{ secrets.EVERYTHINGPT }} .
57-
58-
# scoop
59-
# cd ..
60-
# git clone -b EverythingPowerToys https://github.com/lin-ycv/ScoopExtras.git --depth 1
61-
# cd .\ScoopExtras\bucket
62-
# gh repo sync lin-ycv/ScoopExtras -b master
63-
# git pull
64-
# rm everything-powertoys.json -Force
65-
# Invoke-WebRequest https://github.com/lin-ycv/EverythingPowerToys/raw/scoop/everything-powertoys.json -OutFile everything-powertoys.json
66-
# (Get-Content everything-powertoys.json) | ForEach-Object {$_ -Replace '_VERSION_', $ver} | ForEach-Object {$_ -Replace '_URL_', $zip} | ForEach-Object {$_ -Replace '_CRC_', $ziphash} | ForEach-Object {$_ -Replace '_armURL_', $zipARM} | ForEach-Object {$_ -Replace '_armCRC_', $zipARMhash} | Set-Content everything-powertoys.json
67-
# git add .
68-
# git commit -m "everything-powertoys@$ver : update"
69-
# git push -f
70-
# gh repo set-default ScoopInstaller/Extras
71-
# gh pr create --base master --title "everything-powertoys@$ver : update" --body "- [X] I have read the [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md)."
49+
Get-ChildItem *.* -Recurse | ForEach { (Get-Content $_) | ForEach {$_ -Replace '_VERSION_', $Latest.Version} | ForEach {$_ -Replace '_X64_', $Latest.URL64} | ForEach {$_ -Replace '_HASH64_', $Latest.Checksum64} | ForEach {$_ -Replace '_ARM64_', $Latest.ARM64} | ForEach {$_ -Replace '_HASHarm64_', $Latest.Checksuma64} | Set-Content $_ }
50+
..\wingetcreate submit -p "New version: EverythingPowerToys version $Latest.Version" -t ${{ secrets.EVERYTHINGPT }} .

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"IsGlobal": true,
55
"Name": "Everything",
66
"Author": "Yu Chieh (Victor) Lin",
7-
"Version": "0.91.0",
7+
"Version": "0.91.1",
88
"Language": "csharp",
99
"Website": "https://github.com/Lin-ycv/EverythingPowerToys",
1010
"ExecuteFileName": "Community.PowerToys.Run.Plugin.Everything.dll",

0 commit comments

Comments
 (0)