mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
ci/release: add sha256 sums to release artifacts
Fixes #1924, Closes #2168
This commit is contained in:
parent
d67809d6c4
commit
8d464e5c78
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -153,16 +153,20 @@ jobs:
|
|||||||
if [ "${{ matrix.os }}" = "windows-2022" ]; then
|
if [ "${{ matrix.os }}" = "windows-2022" ]; then
|
||||||
cp "target/${{ matrix.target }}/release/rg.exe" "$staging/"
|
cp "target/${{ matrix.target }}/release/rg.exe" "$staging/"
|
||||||
7z a "$staging.zip" "$staging"
|
7z a "$staging.zip" "$staging"
|
||||||
|
certutil -hashfile "$staging.zip" SHA256 > "$staging.zip.sha256"
|
||||||
echo "ASSET=$staging.zip" >> $GITHUB_ENV
|
echo "ASSET=$staging.zip" >> $GITHUB_ENV
|
||||||
|
echo "ASSET_SUM=$staging.zip.sha256" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
# The man page is only generated on Unix systems. ¯\_(ツ)_/¯
|
# The man page is only generated on Unix systems. ¯\_(ツ)_/¯
|
||||||
cp "$outdir"/rg.1 "$staging/doc/"
|
cp "$outdir"/rg.1 "$staging/doc/"
|
||||||
cp "target/${{ matrix.target }}/release/rg" "$staging/"
|
cp "target/${{ matrix.target }}/release/rg" "$staging/"
|
||||||
tar czf "$staging.tar.gz" "$staging"
|
tar czf "$staging.tar.gz" "$staging"
|
||||||
|
shasum -a 256 "$staging.tar.gz" > "$staging.tar.gz.sha256"
|
||||||
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
|
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
|
||||||
|
echo "ASSET_SUM=$staging.tar.gz.sha256" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload release archive
|
- name: Upload release archive
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: gh release upload ${{ needs.create-release.outputs.rg_version }} ${{ env.ASSET }}
|
run: gh release upload ${{ needs.create-release.outputs.rg_version }} ${{ env.ASSET }} ${{ env.ASSET_SUM }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user