gpu-dawn: CI: upload headers.json + tarball

Fixes hexops/mach#171
Helps hexops/mach#109

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-02-27 19:29:56 -07:00
parent 262422edde
commit 028b7d8034
5 changed files with 69 additions and 24 deletions

20
gpu-dawn/dev/upload-release.sh Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -exuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"/..
# Prepare tarball, headers.json.gz, etc.
./dev/bundle-release.sh
if [[ "${UPLOAD_HEADERS:-"false"}" == "true" ]]; then
# Upload headers.json.gz
gh release upload "release-$(git rev-parse --short HEAD)" headers.json.gz
fi
# Upload static library individually.
cp zig-out/lib/libdawn.a "libdawn_$RELEASE_NAME.a"
gzip -9 "libdawn_$RELEASE_NAME.a"
gh release upload "release-$(git rev-parse --short HEAD)" "libdawn_$RELEASE_NAME.a"
# Upload tarball of static library + headers.
mv out.tar.gz "$RELEASE_NAME.tar.gz"
gh release upload "release-$(git rev-parse --short HEAD)" "$RELEASE_NAME.tar.gz"