From 64bf86c63663f9722bdd9b26ae1f56687c525c7f Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 22:29:33 +0300 Subject: [PATCH 01/10] Rename ReleaseNotes.md to ReleaseNotesTemplate.md --- ReleaseNotes.md => ReleaseNotesTemplate.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ReleaseNotes.md => ReleaseNotesTemplate.md (100%) diff --git a/ReleaseNotes.md b/ReleaseNotesTemplate.md similarity index 100% rename from ReleaseNotes.md rename to ReleaseNotesTemplate.md From 6343fdffe8699e9558c791af5c7fc52aed41f56b Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 22:33:01 +0300 Subject: [PATCH 02/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 44 +++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index e67764c7..c436afd8 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -301,22 +301,30 @@ jobs: "$($_.Name) $((Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash)" } | Add-Content -Path SHA256SUM -Encoding Default -Force - - name: Upload archives to release - uses: svenstaro/upload-release-action@master - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: Sophia*.zip - tag: ${{ github.ref }} - overwrite: true - file_glob: true - prerelease: true - - - name: Upload archives to release - uses: svenstaro/upload-release-action@master + - name: ReleaseNotesTemplate + id: read_release + run: | + $Parameters = @{ + Uri = "https://api.github.com/repos/farag2/Sophia-Script-for-Windows/releases" + UseBasicParsing = $true + Verbose = $true + } + $Penultimate = (Invoke-RestMethod @Parameters).tag_name | Select-Object -Index 1 + + # https://en.wikipedia.org/wiki/Percent-encoding + $Release = (Get-Content -Path ReleaseNotesTemplate.md -Encoding utf8 -Raw).replace("%", "%25").replace("`n", "%0A").replace("`r", "%0D").replace("NewVersion", "${{ github.ref_name }}").replace("OldVersion", $Penultimate) + + # https://trstringer.com/github-actions-multiline-strings/ + echo "::set-output name=RELEASE_BODY::$Release" + $ReleaseName = Get-Date -f "dd.MM.yyyy" + echo "RELEASE_NAME=$ReleaseName" >> $env:GITHUB_ENV + + - name: Uploading + uses: softprops/action-gh-release@master with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: SHA256SUM - tag: ${{ github.ref }} - overwrite: true - file_glob: true - prerelease: true + name: ${{ env.RELEASE_NAME }} + token: ${{ github.token }} + files: | + Sophia*.zip + SHA256SUM + body: ${{ steps.read_release.outputs.RELEASE_BODY }} From ac730d24c74f553bdee9162835dde145bcbe64f8 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 22:40:27 +0300 Subject: [PATCH 03/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index c436afd8..1275aa45 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -3,7 +3,7 @@ name: Build on: push: tags: - - '*.*.*' + - "*.*" jobs: patch: From a288bb9b4b162926f5f8bb3f42f4babd9a82d338 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 22:50:21 +0300 Subject: [PATCH 04/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index 1275aa45..a0c5368a 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -29,7 +29,7 @@ jobs: $Parameters = @{ Uri = "https://github.com/dlwyatt/PolicyFileEditor/archive/refs/tags/$LatestPolicyFileEditorVersion.zip" - OutFile = "$PSScriptRoot\$LatestPolicyFileEditorVersion.zip" + OutFile = "Scripts\$LatestPolicyFileEditorVersion.zip" UseBasicParsing = $true Verbose = $true } @@ -38,19 +38,19 @@ jobs: # Expand zip archive $Parameters = @{ Path = "$PSScriptRoot\$LatestPolicyFileEditorVersion.zip" - DestinationPath = "$PSScriptRoot" + DestinationPath = "Scripts" Force = $true Verbose = $true } Expand-Archive @Parameters $Path = @( - "$PSScriptRoot\PolicyFileEditor-$LatestPolicyFileEditorVersion\DscResources", - "$PSScriptRoot\PolicyFileEditor-$LatestPolicyFileEditorVersion\en-US", - "$PSScriptRoot\PolicyFileEditor-$LatestPolicyFileEditorVersion\build.psake.ps1", - "$PSScriptRoot\PolicyFileEditor-$LatestPolicyFileEditorVersion\LICENSE", - "$PSScriptRoot\PolicyFileEditor-$LatestPolicyFileEditorVersion\PolicyFileEditor.Tests.ps1", - "$PSScriptRoot\PolicyFileEditor-$LatestPolicyFileEditorVersion\README.md" + "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion\DscResources", + "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion\en-US", + "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion\build.psake.ps1", + "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion\LICENSE", + "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion\PolicyFileEditor.Tests.ps1", + "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion\README.md" ) Remove-Item -Path $Path -Recurse -Force @@ -59,19 +59,19 @@ jobs: # Download Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll $Parameters = @{ Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref" - OutFile = "$PSScriptRoot\microsoft.windows.sdk.net.ref.nupkg" + OutFile = "Scripts\microsoft.windows.sdk.net.ref.nupkg" UseBasicParsing = $true } Invoke-RestMethod @Parameters # Rename archive to able to expand it - Rename-Item -Path "$PSScriptRoot\microsoft.windows.sdk.net.ref.nupkg" -NewName "$PSScriptRoot\microsoft.windows.sdk.net.ref.zip" -Force + Rename-Item -Path "Scripts\microsoft.windows.sdk.net.ref.nupkg" -NewName "$PSScriptRoot\microsoft.windows.sdk.net.ref.zip" -Force # Extract Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll from archive Add-Type -Assembly System.IO.Compression.FileSystem - $ZIP = [IO.Compression.ZipFile]::OpenRead("$PSScriptRoot\microsoft.windows.sdk.net.ref.zip") + $ZIP = [IO.Compression.ZipFile]::OpenRead("Scripts\microsoft.windows.sdk.net.ref.zip") $Entries = $ZIP.Entries | Where-Object -FilterScript {($_.FullName -eq "lib/Microsoft.Windows.SDK.NET.dll") -or ($_.FullName -eq "lib/WinRT.Runtime.dll")} - $Entries | ForEach-Object -Process {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$PSScriptRoot\$($_.Name)", $true)} + $Entries | ForEach-Object -Process {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "Scripts\$($_.Name)", $true)} $ZIP.Dispose() - name: Sophia Script for Windows 10 @@ -120,7 +120,7 @@ jobs: New-Item -Path "Sophia Script for Windows 10 PowerShell 7 v$LatestRelease\bin" -ItemType Directory -Force $Parameters = @{ - Path = @("$PSScriptRoot\PolicyFileEditor", "$PSScriptRoot\WinRT.Runtime.dll", "$PSScriptRoot\Microsoft.Windows.SDK.NET.dll") + Path = @("Scripts\PolicyFileEditor", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll") Destination = "Sophia Script for Windows 10 PowerShell 7 v$LatestRelease\bin" Recurse = $true Force = $true @@ -253,7 +253,7 @@ jobs: New-Item -Path "Sophia Script for Windows 11 PowerShell 7 v$LatestRelease\bin" -ItemType Directory -Force $Parameters = @{ - Path = @("$PSScriptRoot\PolicyFileEditor", "$PSScriptRoot\WinRT.Runtime.dll", "$PSScriptRoot\Microsoft.Windows.SDK.NET.dll") + Path = @("Scripts\PolicyFileEditor", "Scripts\WinRT.Runtime.dll", "Scripts\Microsoft.Windows.SDK.NET.dll") Destination = "Sophia Script for Windows 11 PowerShell 7 v$LatestRelease\bin" Recurse = $true Force = $true From 3b3ecd21badbf4943b15316e84e4e1a1b3ac4cb7 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 22:53:51 +0300 Subject: [PATCH 05/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index a0c5368a..db8607f3 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -37,7 +37,7 @@ jobs: # Expand zip archive $Parameters = @{ - Path = "$PSScriptRoot\$LatestPolicyFileEditorVersion.zip" + Path = "Scripts\$LatestPolicyFileEditorVersion.zip" DestinationPath = "Scripts" Force = $true Verbose = $true @@ -54,7 +54,7 @@ jobs: ) Remove-Item -Path $Path -Recurse -Force - Rename-Item -Path "$PSScriptRoot\PolicyFileEditor-$LatestPolicyFileEditorVersion" -NewName "$PSScriptRoot\PolicyFileEditor" -Force + Rename-Item -Path "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion" -NewName "Scripts\PolicyFileEditor" -Force # Download Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll $Parameters = @{ From 4fd2cd2d9be9f936eebcc46f07c8fe2c74a4eb08 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 23:22:10 +0300 Subject: [PATCH 06/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index db8607f3..6c137d49 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -54,7 +54,7 @@ jobs: ) Remove-Item -Path $Path -Recurse -Force - Rename-Item -Path "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion" -NewName "Scripts\PolicyFileEditor" -Force + Rename-Item -Path "Scripts\PolicyFileEditor-$LatestPolicyFileEditorVersion" -NewName "PolicyFileEditor" -Force # Download Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll $Parameters = @{ From d49c9dd5fc5e6b6df80fff68027f76a6582375bb Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 23:24:23 +0300 Subject: [PATCH 07/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index 6c137d49..2618c899 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -65,7 +65,7 @@ jobs: Invoke-RestMethod @Parameters # Rename archive to able to expand it - Rename-Item -Path "Scripts\microsoft.windows.sdk.net.ref.nupkg" -NewName "$PSScriptRoot\microsoft.windows.sdk.net.ref.zip" -Force + Rename-Item -Path "Scripts\microsoft.windows.sdk.net.ref.nupkg" -NewName "microsoft.windows.sdk.net.ref.zip" -Force # Extract Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll from archive Add-Type -Assembly System.IO.Compression.FileSystem From 8be108c842363d59606a0e1946b2fd322ed305b3 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 23:27:08 +0300 Subject: [PATCH 08/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index 2618c899..c644cef4 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -86,7 +86,7 @@ jobs: New-Item -Path "Sophia Script for Windows 10 v$LatestRelease\bin" -ItemType Directory -Force $Parameters = @{ - Path = @("$PSScriptRoot\PolicyFileEditor") + Path = @("Scripts\PolicyFileEditor") Destination = "Sophia Script for Windows 10 v$LatestRelease\bin" Recurse = $true Force = $true @@ -154,7 +154,7 @@ jobs: New-Item -Path "Sophia Script for Windows 10 LTSC 2019 v$LatestRelease\bin" -ItemType Directory -Force $Parameters = @{ - Path = @("$PSScriptRoot\PolicyFileEditor") + Path = @("Scripts\PolicyFileEditor") Destination = "Sophia Script for Windows 10 LTSC 2019 v$LatestRelease\bin" Recurse = $true Force = $true @@ -187,7 +187,7 @@ jobs: New-Item -Path "Sophia Script for Windows 10 LTSC 2021 v$LatestRelease\bin" -ItemType Directory -Force $Parameters = @{ - Path = @("$PSScriptRoot\PolicyFileEditor") + Path = @("Scripts\PolicyFileEditor") Destination = "Sophia Script for Windows 10 LTSC 2021 v$LatestRelease\bin" Recurse = $true Force = $true @@ -220,7 +220,7 @@ jobs: New-Item -Path "Sophia Script for Windows 11 v$LatestRelease\bin" -ItemType Directory -Force $Parameters = @{ - Path = @("$PSScriptRoot\PolicyFileEditor") + Path = @("Scripts\PolicyFileEditor") Destination = "Sophia Script for Windows 11 v$LatestRelease\bin" Recurse = $true Force = $true From 9b2bb07a4d1f3bcd743a794b29e819bbdab0b38b Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Sun, 18 Sep 2022 23:33:24 +0300 Subject: [PATCH 09/10] Update Sophia.yml --- .github/workflows/Sophia.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index c644cef4..f8abee4c 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -59,18 +59,15 @@ jobs: # Download Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll $Parameters = @{ Uri = "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.NET.Ref" - OutFile = "Scripts\microsoft.windows.sdk.net.ref.nupkg" + OutFile = "Scripts\microsoft.windows.sdk.net.ref.zip" UseBasicParsing = $true } Invoke-RestMethod @Parameters - # Rename archive to able to expand it - Rename-Item -Path "Scripts\microsoft.windows.sdk.net.ref.nupkg" -NewName "microsoft.windows.sdk.net.ref.zip" -Force - # Extract Microsoft.Windows.SDK.NET.dll & WinRT.Runtime.dll from archive Add-Type -Assembly System.IO.Compression.FileSystem $ZIP = [IO.Compression.ZipFile]::OpenRead("Scripts\microsoft.windows.sdk.net.ref.zip") - $Entries = $ZIP.Entries | Where-Object -FilterScript {($_.FullName -eq "lib/Microsoft.Windows.SDK.NET.dll") -or ($_.FullName -eq "lib/WinRT.Runtime.dll")} + $Entries = $ZIP.Entries | Where-Object -FilterScript {($_.FullName -eq "lib/net6.0/Microsoft.Windows.SDK.NET.dll") -or ($_.FullName -eq "lib/net6.0/WinRT.Runtime.dll")} $Entries | ForEach-Object -Process {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "Scripts\$($_.Name)", $true)} $ZIP.Dispose() @@ -186,6 +183,7 @@ jobs: Write-Verbose -Message "Sophia.Script.for.Windows.10.LTSC.2021.v$LatestRelease.zip" -Verbose New-Item -Path "Sophia Script for Windows 10 LTSC 2021 v$LatestRelease\bin" -ItemType Directory -Force + $Parameters = @{ Path = @("Scripts\PolicyFileEditor") Destination = "Sophia Script for Windows 10 LTSC 2021 v$LatestRelease\bin" From b04f2145b6b6e0f04cb090b30060af5c3ea3f2b7 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Mon, 19 Sep 2022 00:07:28 +0300 Subject: [PATCH 10/10] Update ReleaseNotesTemplate.md --- ReleaseNotesTemplate.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ReleaseNotesTemplate.md b/ReleaseNotesTemplate.md index 95c0908b..426f2b5b 100644 --- a/ReleaseNotesTemplate.md +++ b/ReleaseNotesTemplate.md @@ -1,8 +1,8 @@ -# [Donate](https://github.com/Sophia-Community/SophiApp#donations) +[![actions](https://img.shields.io/badge/Sophia%20News-Telegram-blue?style=flat&logo=Telegram)](https://t.me/SophiaNews) [![actions](https://img.shields.io/badge/Sophia%20Chat-Telegram-blue?style=flat&logo=Telegram)](https://t.me/Sophia_Chat) [![Discord](https://discordapp.com/api/guilds/1006179075263561779/widget.png?style=shield)](https://discord.gg/sSryhaEv79) -[![actions](https://img.shields.io/badge/Sophia%20News-Telegram-blue?style=flat&logo=Telegram)](https://t.me/SophiaNews) [![actions](https://img.shields.io/badge/Sophia%20Chat-Telegram-blue?style=flat&logo=Telegram)](https://t.me/Sophia_Chat) [![actions](https://img.shields.io/github/workflow/status/Sophia-Community/SophiApp/Build%20Release?label=GitHub%20Actions&logo=GitHub)](https://github.com/Sophia-Community/SophiApp/actions) [![Discord](https://discordapp.com/api/guilds/1006179075263561779/widget.png?style=shield)](https://discord.gg/sSryhaEv79) +# [Donate](https://github.com/farag2/Sophia-Script-for-Windows#donations) -## NewVersion — ReleaseDate +## Enterprise LTSC 2019 | Enterprise LTSC 2021 | Windows 10 21H2/22H2 | Windows 11 21H2/22H2 -Diff from vNewVersion +Diff from vOldVersion [OldVersion...NewVersion](https://github.com/Sophia-Community/SophiApp/compare/OldVersion...NewVersion)