mirror of
https://github.com/cheikh2shift/godex.git
synced 2026-10-21 18:42:48 -05:00
Refactor installation verification steps in workflow for improved clarity and reliability
This commit is contained in:
1 parent
6950d95e0d
commit
f7f4ac3858
1 file changed
+21
-7
@@ -13,7 +13,9 @@ jobs:
|
||||
- name: Download and run install.sh
|
||||
run: curl -sSL https://raw.githubusercontent.com/cheikh2shift/godex/main/install.sh | sh
|
||||
- name: Verify installation
|
||||
run: godex --version
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
godex --version
|
||||
|
||||
install-macos-amd64:
|
||||
runs-on: macos-15-intel
|
||||
@@ -21,7 +23,9 @@ jobs:
|
||||
- name: Download and run install.sh
|
||||
run: curl -sSL https://raw.githubusercontent.com/cheikh2shift/godex/main/install.sh | sh
|
||||
- name: Verify installation
|
||||
run: godex --version
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
godex --version
|
||||
|
||||
install-macos-arm64:
|
||||
runs-on: macos-latest
|
||||
@@ -29,7 +33,9 @@ jobs:
|
||||
- name: Download and run install.sh
|
||||
run: curl -sSL https://raw.githubusercontent.com/cheikh2shift/godex/main/install.sh | sh
|
||||
- name: Verify installation
|
||||
run: godex --version
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
godex --version
|
||||
|
||||
install-windows:
|
||||
runs-on: windows-latest
|
||||
@@ -38,16 +44,24 @@ jobs:
|
||||
id: get_tag
|
||||
run: |
|
||||
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/cheikh2shift/godex/releases/latest"
|
||||
echo "TAG=v$($response.tag_name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||
echo "TAG=$($response.tag_name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
|
||||
shell: pwsh
|
||||
|
||||
- name: Download Windows binary
|
||||
run: |
|
||||
curl -sSL -o godex-windows-amd64.exe "https://github.com/cheikh2shift/godex/releases/download/${{ steps.get_tag.outputs.TAG }}/godex-windows-amd64.exe"
|
||||
Write-Host "Tag: ${{ steps.get_tag.outputs.TAG }}"
|
||||
curl.exe -sSL -o godex-windows-amd64.exe "https://github.com/cheikh2shift/godex/releases/download/${{ steps.get_tag.outputs.TAG }}/godex-windows-amd64.exe"
|
||||
Get-Item godex-windows-amd64.exe | Select-Object Name, Length
|
||||
shell: pwsh
|
||||
|
||||
- name: Verify installation
|
||||
run: |
|
||||
mv godex-windows-amd64.exe godex.exe
|
||||
./godex.exe --version
|
||||
$bytes = Get-Content godex-windows-amd64.exe -TotalCount 2 -Encoding Byte
|
||||
if ($bytes[0] -eq 77 -and $bytes[1] -eq 90) {
|
||||
Write-Host "Valid PE executable"
|
||||
./godex-windows-amd64.exe --version
|
||||
} else {
|
||||
Write-Host "Invalid file - first bytes: $($bytes[0]) $($bytes[1])"
|
||||
Get-Content godex-windows-amd64.exe -TotalCount 5
|
||||
}
|
||||
shell: pwsh
|
||||
Reference in new issue
Block a user