File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,22 @@ jobs:
139
139
if : matrix.archiver == 'tar.gz' && matrix.universal == true
140
140
run : tar -C ./target -cz -f ${{ matrix.asset }} hl
141
141
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
+
142
158
# - name: Upload binaries to release
143
159
# uses: svenstaro/upload-release-action@v2
144
160
# with:
You can’t perform that action at this time.
0 commit comments