From 54b86c4febe40a252a5af00e9da0fde8b1d591e6 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Wed, 21 Aug 2024 15:28:48 +0300 Subject: [PATCH] Updated Sophia.yml --- .github/workflows/Sophia.yml | 27 +++++++++++++++++++- README.md | 5 ---- README_de-de.md | 5 ---- README_uk-ua.md | 5 ---- ReleaseNotesTemplate.md | 34 +++++++++++++++++++++++++ img/SSdownloadbutton.svg | 49 ------------------------------------ 6 files changed, 60 insertions(+), 65 deletions(-) delete mode 100644 img/SSdownloadbutton.svg diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index bd489076..7f5b378e 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -64,8 +64,33 @@ jobs: } $Penultimate = (Invoke-RestMethod @Parameters).tag_name | Select-Object -Index 1 + # Parse json for the latest script versions + $Parameters = @{ + Uri = "https://raw.githubusercontent.com/farag2/Sophia-Script-for-Windows/master/sophia_script_versions.json" + UseBasicParsing = $true + Verbose = $true + } + $Sophia_Script_Windows_10_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerShell_5_1 + $Sophia_Script_Windows_10_PowerShell_7 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_PowerShell_7 + $Sophia_Script_Windows_10_LTSC2019 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC2019 + $Sophia_Script_Windows_10_LTSC2021 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_10_LTSC2021 + $Sophia_Script_Windows_11_PowerShell_5_1 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_5_1 + $Sophia_Script_Windows_11_PowerShell_7 = (Invoke-RestMethod @Parameters).Sophia_Script_Windows_11_PowerShell_7 + $Sophia_Script_Wrapper = (Invoke-RestMethod @Parameters).Sophia_Script_Wrapper + + # Replace variables with script latest versions # No need to replace special characters with percent-encoding ones - (Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).replace("NewVersion", "${{ github.ref_name }}").replace("OldVersion", $Penultimate) | Set-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Force + (Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw) | Foreach-Object -Process { + $_ -replace "NewVersion", "${{ github.ref_name }}" ` + -replace "OldVersion", $Penultimate ` + -replace "Sophia_Script_Windows_10_PowerShell_5_1", $Sophia_Script_Windows_10_PowerShell_5_1 ` + -replace "Sophia_Script_Windows_10_PowerShell_7", $Sophia_Script_Windows_10_PowerShell_7 ` + -replace "Sophia_Script_Windows_10_LTSC2019", $Sophia_Script_Windows_10_LTSC2019 ` + -replace "Sophia_Script_Windows_10_LTSC2021", $Sophia_Script_Windows_10_LTSC2021 ` + -replace "Sophia_Script_Windows_11_PowerShell_5_1", $Sophia_Script_Windows_11_PowerShell_5_1 ` + -replace "Sophia_Script_Windows_11_PowerShell_7", $Sophia_Script_Windows_11_PowerShell_7 ` + -replace "Sophia_Script_Wrapper", $Sophia_Script_Wrapper + } | Set-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Force # https://trstringer.com/github-actions-multiline-strings/ Add-Content -Path $env:GITHUB_OUTPUT -Value "ReleaseBody=ReleaseNotesTemplate.md" diff --git a/README.md b/README.md index 79711712..ae4c9796 100644 --- a/README.md +++ b/README.md @@ -101,11 +101,6 @@ -| ![ko-fi](https://img.shields.io/badge/tether-168363?style=for-the-badge&logo=tether&logoColor=white) | -|:----------------------------------------------------------------------------------------------------:| -| USDT (TRC20) | -| `TQtMjdocUWbKAeg1kLtB4ApjAVHt1v8Rtf` | - ## System Requirements [Windows-10]: https://support.microsoft.com/topic/windows-10-update-history-8127c2c6-6edf-4fdf-8b9f-0f7be1ef3562 diff --git a/README_de-de.md b/README_de-de.md index becd586f..75d604cf 100644 --- a/README_de-de.md +++ b/README_de-de.md @@ -101,11 +101,6 @@ -| ![ko-fi](https://img.shields.io/badge/tether-168363?style=for-the-badge&logo=tether&logoColor=white) | -|:----------------------------------------------------------------------------------------------------:| -| USDT (TRC20) | -| `TQtMjdocUWbKAeg1kLtB4ApjAVHt1v8Rtf` | - ## System-Voraussetzungen [Windows-10]: https://support.microsoft.com/topic/windows-10-update-history-8127c2c6-6edf-4fdf-8b9f-0f7be1ef3562 diff --git a/README_uk-ua.md b/README_uk-ua.md index 541073c9..dfdd1413 100644 --- a/README_uk-ua.md +++ b/README_uk-ua.md @@ -101,11 +101,6 @@ -| ![ko-fi](https://img.shields.io/badge/tether-168363?style=for-the-badge&logo=tether&logoColor=white) | -|:----------------------------------------------------------------------------------------------------:| -| USDT (TRC20) | -| `TQtMjdocUWbKAeg1kLtB4ApjAVHt1v8Rtf` | - ## Системні вимоги [Windows-10]: https://support.microsoft.com/topic/windows-10-update-history-8127c2c6-6edf-4fdf-8b9f-0f7be1ef3562 diff --git a/ReleaseNotesTemplate.md b/ReleaseNotesTemplate.md index 04e10e93..e2a81a00 100644 --- a/ReleaseNotesTemplate.md +++ b/ReleaseNotesTemplate.md @@ -6,3 +6,37 @@ Diff from vOldVersion [OldVersion...NewVersion](https://github.com/farag2/Sophia-Script-for-Windows/compare/OldVersion...NewVersion) + + +*** + +[Sophia-Script-Windows-10-PowerShell-5-1]: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/NewVersion/Sophia.Script.for.Windows.10.vSophia_Script_Windows_10_PowerShell_5_1.zip +[Sophia-Script-Windows-10-PowerShell-5-1-badge]: https://img.shields.io/badge/Windows%2010%20x64-PowerShell%205.1-67b7d1.svg + +[Sophia-Script-Windows-10-PowerShell-7]: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/NewVersion/Sophia.Script.for.Windows.10.PowerShell.7.vSophia_Script_Windows_10_PowerShell_7.zip +[Sophia-Script-Windows-10-PowerShell-7-badge]: https://img.shields.io/badge/Windows%2010%20x64-PowerShell%207-67b7d1.svg + +[Sophia-Script-Windows-10-LTSC2019]: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/NewVersion/Sophia.Script.for.Windows.10.LTSC.2019.vSophia_Script_Windows_10_LTSC2019.zip +[Sophia-Script-Windows-10-LTSC2019-badge]: https://img.shields.io/badge/Windows%2010%20x64-LTSC%202019-67b7d1.svg + +[Sophia-Script-Windows-10-LTSC2021]: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/NewVersion/Sophia.Script.for.Windows.10.LTSC.2021.vSophia_Script_Windows_10_LTSC2021.zip +[Sophia-Script-Windows-10-LTSC2021-badge]: https://img.shields.io/badge/Windows%2010%20x64-LTSC%202021-67b7d1.svg + +[Sophia-Script-Windows-11-PowerShell-5-1]: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/NewVersion/Sophia.Script.for.Windows.11.vSophia_Script_Windows_11_PowerShell_5_1.zip +[Sophia-Script-Windows-11-PowerShell-5-1-badge]: https://img.shields.io/badge/Windows%2011%20x64-PowerShell%205.1-67b7d1.svg + +[Sophia-Script-Windows-11-PowerShell-7]: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/NewVersion/Sophia.Script.for.Windows.11.PowerShell.7.vSophia_Script_Windows_11_PowerShell_7.zip +[Sophia-Script-Windows-11-PowerShell-7-badge]: https://img.shields.io/badge/Windows%2011%20x64-PowerShell%207-67b7d1.svg + +[Sophia-Script-Wrapper]: https://github.com/farag2/Sophia-Script-for-Windows/releases/download/NewVersion/Sophia.Script.Wrapper.vSophia_Script_Wrapper.zip +[Sophia-Script-Wrapper-badge]: https://img.shields.io/badge/Sophia%20Script%20Wrapper-67b7d1.svg + +| Download | +|:----------------------------------------------------------------------------------------------------| +| [![Script][Sophia-Script-Windows-10-PowerShell-5-1-badge]][Sophia-Script-Windows-10-PowerShell-5-1] | +| [![Script][Sophia-Script-Windows-10-PowerShell-7-badge]][Sophia-Script-Windows-10-PowerShell-7] | +| [![Script][Sophia-Script-Windows-10-LTSC2019-badge]][Sophia-Script-Windows-10-LTSC2019] | +| [![Script][Sophia-Script-Windows-10-LTSC2021-badge]][Sophia-Script-Windows-10-LTSC2021] | +| [![Script][Sophia-Script-Windows-11-PowerShell-5-1-badge]][Sophia-Script-Windows-11-PowerShell-5-1] | +| [![Script][Sophia-Script-Windows-11-PowerShell-7-badge]][Sophia-Script-Windows-11-PowerShell-7] | +| [![Script][Sophia-Script-Wrapper-badge]][Sophia-Script-Wrapper] | diff --git a/img/SSdownloadbutton.svg b/img/SSdownloadbutton.svg deleted file mode 100644 index 8301018e..00000000 --- a/img/SSdownloadbutton.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - -