From 94dc8953e57b546b6b4420085f0a39d104e0389a Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Thu, 5 Aug 2021 18:16:27 +0300 Subject: [PATCH] Update Sophia.yml --- .github/workflows/Sophia.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/Sophia.yml b/.github/workflows/Sophia.yml index d486c0e8..2810a021 100644 --- a/.github/workflows/Sophia.yml +++ b/.github/workflows/Sophia.yml @@ -137,6 +137,27 @@ jobs: "$($_.Name) $((Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash)" } | Add-Content -Path SHA256SUM -Encoding Default -Force + - name: Build Windows 11 + run: | + $ModuleVersion = (Import-PowerShellDataFile -Path "Sophia\Windows 11\Manifest\Sophia.psd1").ModuleVersion + Write-Host $ModuleVersion + $BUILD_DIR = "Sophia Script Windows 11 v$ModuleVersion" + $ZIP = "$BUILD_DIR.zip" + + New-Item -Path $BUILD_DIR -ItemType Directory -Force + + Write-Host $BUILD_DIR + Write-Host $ZIP + + Get-ChildItem -Path Sophia\Windows 11 | Copy-Item -Destination $BUILD_DIR -Recurse -Force + + Compress-Archive -Path $BUILD_DIR -DestinationPath $ZIP -Force + + # Calculate hash + Get-Item -Path $ZIP -Force | ForEach-Object -Process { + "$($_.Name) $((Get-FileHash -LiteralPath $_.FullName -Algorithm SHA256).Hash)" + } | Add-Content -Path SHA256SUM -Encoding Default -Force + - name: Wrapper run: | # The Trim.() is needed to trim the downloaded text version string