mirror of
https://github.com/ergosteur/ssh-protocol-handler-win.git
synced 2026-04-19 13:39:33 -04:00
Configure Git line endings and enhance script checks
Added a step to configure Git line endings and improved the shell script to check for file existence before processing.
This commit is contained in:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -15,8 +15,10 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
autocrlf: input
|
||||
|
||||
# This replaces the invalid 'autocrlf' input
|
||||
- name: Configure Git Line Endings
|
||||
run: git config --global core.autocrlf input
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
@@ -42,15 +44,18 @@ jobs:
|
||||
shell: pwsh
|
||||
run: |
|
||||
$path = "ssh-handler.sh"
|
||||
if (Test-Path $path) {
|
||||
$content = [System.IO.File]::ReadAllText((Get-Item $path).FullName)
|
||||
$content = $content -replace "`r`n", "`n"
|
||||
[System.IO.File]::WriteAllText((Get-Item $path).FullName, $content, (New-Object System.Text.UTF8Encoding($false)))
|
||||
Write-Host "Successfully converted $path to LF"
|
||||
}
|
||||
|
||||
- name: Prepare Assets with Versioning
|
||||
shell: pwsh
|
||||
run: |
|
||||
$tag = "${{ github.ref_name }}"
|
||||
if (-not $tag) { $tag = "manual" }
|
||||
if (-not $tag -or $tag -eq "main") { $tag = "manual" }
|
||||
|
||||
# Rename Executables
|
||||
Move-Item ./publish-standalone/SshHandler.exe "./SshHandler-$tag-Standalone.exe"
|
||||
|
||||
Reference in New Issue
Block a user