File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,20 @@ jobs:
7878 - name : Build binary
7979 run : ${{ matrix.CMD_BUILD }}
8080 - name : Generate SHA256
81+ shell : bash
82+ if : runner.os != 'Windows'
8183 run : |
82- if [ "${{ runner.os }}" = "Windows" ]; then
83- certutil -hashfile ${{ matrix.OUT_FILE_NAME }} SHA256 | findstr /v "hash" > ${{ matrix.OUT_FILE_NAME }}.sha256
84- elif [ "${{ runner.os }}" = "macOS" ]; then
84+ if [ "${{ runner.os }}" = "macOS" ]; then
8585 shasum -a 256 ${{ matrix.OUT_FILE_NAME }} > ${{ matrix.OUT_FILE_NAME }}.sha256
8686 else
8787 sha256sum ${{ matrix.OUT_FILE_NAME }} > ${{ matrix.OUT_FILE_NAME }}.sha256
8888 fi
89+ - name : Generate SHA256 (Windows)
90+ if : runner.os == 'Windows'
91+ shell : pwsh
92+ run : |
93+ $hash = (Get-FileHash -Algorithm SHA256 ${{ matrix.OUT_FILE_NAME }}).Hash.ToLower()
94+ $hash + " *${{ matrix.OUT_FILE_NAME }}" | Out-File -Encoding utf8 ${{ matrix.OUT_FILE_NAME }}.sha256
8995 - name : Upload artifacts
9096 uses : actions/upload-artifact@v3
9197 with :
You can’t perform that action at this time.
0 commit comments