|
75 | 75 | cp src/convert_lora_to_gguf.py $distPath/src/
|
76 | 76 | cp src/convert_lora_to_ggml.py $distPath/src/
|
77 | 77 |
|
| 78 | + - name: Generate SHA256 (Windows) |
| 79 | + if: matrix.os == 'windows-latest' |
| 80 | + run: | |
| 81 | + $distPath = if ("${{ github.event.inputs.build_type }}" -eq "RELEASE") { "build\release\dist" } else { "build\dev\dist" } |
| 82 | + $archSuffix = if ("${{ matrix.arch }}" -eq "x86") { "-x86" } else { "-x64" } |
| 83 | + $exeName = "AutoGGUF$archSuffix.exe" |
| 84 | + $versionHash = "${{ github.sha }}".Substring(0, 7) |
| 85 | + $hashFile = "AutoGGUF-$versionHash.sha256" |
| 86 | + Get-FileHash "$distPath\$exeName" -Algorithm SHA256 | Select-Object -ExpandProperty Hash | Out-File -FilePath "$distPath\$hashFile" |
| 87 | +
|
| 88 | + - name: Generate SHA256 (Linux/macOS) |
| 89 | + if: matrix.os != 'windows-latest' |
| 90 | + run: | |
| 91 | + distPath=$(if [ "${{ github.event.inputs.build_type }}" = "RELEASE" ]; then echo "build/release/dist"; else echo "build/dev/dist"; fi) |
| 92 | + exeName="AutoGGUF-x64" |
| 93 | + versionHash=$(echo ${{ github.sha }} | cut -c1-7) |
| 94 | + hashFile="AutoGGUF-$versionHash.sha256" |
| 95 | + sha256sum "$distPath/$exeName" | awk '{print $1}' > "$distPath/$hashFile" |
| 96 | +
|
78 | 97 | - name: Upload Artifact
|
79 | 98 | uses: actions/upload-artifact@v2
|
80 | 99 | with:
|
81 | 100 | name: AutoGGUF-${{ matrix.os }}-${{ matrix.arch }}-${{ github.event.inputs.build_type }}-${{ github.sha }}
|
82 |
| - path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist |
| 101 | + path: | |
| 102 | + build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist |
| 103 | + !build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist/AutoGGUF-*.sha256 |
83 | 104 |
|
| 105 | + - name: Upload SHA256 |
| 106 | + uses: actions/upload-artifact@v2 |
| 107 | + with: |
| 108 | + name: AutoGGUF-${{ github.sha }}-SHA256 |
| 109 | + path: build/${{ github.event.inputs.build_type == 'RELEASE' && 'release' || 'dev' }}/dist/AutoGGUF-*.sha256 |
0 commit comments