Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5d2d465

Browse files
committedDec 17, 2024··
debug
1 parent 4870d7a commit 5d2d465

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎.github/workflows/publish.yml

+16
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,22 @@ jobs:
139139
if: matrix.archiver == 'tar.gz' && matrix.universal == true
140140
run: tar -C ./target -cz -f ${{ matrix.asset }} hl
141141

142+
- name: Check file type
143+
if: matrix.family == 'windows'
144+
shell: powershell
145+
run: |
146+
$path = ".\target\${{ matrix.target }}\release\hl.exe";
147+
$bytes = [System.IO.File]::ReadAllBytes($path);
148+
$peOffset = [BitConverter]::ToInt32($bytes, 60);
149+
$machine = [BitConverter]::ToUInt16($bytes, $peOffset + 4);
150+
switch ($machine) {
151+
0x014c { "Architecture: x86 (32-bit)" }
152+
0x8664 { "Architecture: x64 (64-bit)" }
153+
0xAA64 { "Architecture: ARM64 (aarch64)" }
154+
0x01C0 { "Architecture: ARM (32-bit)" }
155+
default { "Architecture: Unknown" }
156+
}
157+
142158
# - name: Upload binaries to release
143159
# uses: svenstaro/upload-release-action@v2
144160
# with:

0 commit comments

Comments
 (0)
Please sign in to comment.