Commit f0602126 authored by Christopher Schinnerl's avatar Christopher Schinnerl

add signing

parent 5800502d
Pipeline #32457366 passed with stages
in 67 minutes and 32 seconds
......@@ -126,5 +126,5 @@ deploy:
paths:
- $CI_PROJECT_DIR/artifacts
script:
- make deploy
- ./deploy.sh $NIGHTLY_SIGNING_KEY
- cp -R ./artifacts $CI_PROJECT_DIR/artifacts
......@@ -83,10 +83,6 @@ release:
release-race:
go install -race -tags='netgo' -a -ldflags='-s -w $(ldflags)' $(pkgs)
# deploy builds release binaries for every platform.
deploy:
./deploy.sh
# clean removes all directories that get automatically created during
# development.
clean:
......
#!/bin/bash
PRIVKEY=$1
# Create fresh artifacts folder.
rm -rf artifacts
mkdir artifacts
# Generate public key from private key.
echo "$PRIVKEY" | openssl rsa -in - -outform PEM -pubout -out artifacts/pubkey.pem
if [ $? -ne 0 ]; then
exit $?
fi
# Build binaries and sign them.
for arch in amd64 arm; do
for os in darwin linux windows; do
for pkg in siac siad; do
......@@ -19,6 +31,11 @@ for arch in amd64 arm; do
if [ $? -ne 0 ]; then
exit $?
fi
echo "$PRIVKEY" | openssl dgst -sha256 -sign - -out artifacts/$arch/$os/$bin.sha256 artifacts/$arch/$os/$bin
if [ $? -ne 0 ]; then
exit $?
fi
done
done
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment