1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 13:19:02 +08:00
nali/.github/scripts/upload_s3.sh
zu1k 43388e84a9
chore: Upload binaries to s3
Signed-off-by: zu1k <i@zu1k.com>
2022-07-24 13:20:51 +08:00

21 lines
369 B
Bash

#!/bin/sh
set -e
aws configure --profile s3 <<-EOF > /dev/null 2>&1
${S3_ACCESS_KEY_ID}
${S3_SECRET_ACCESS_KEY}
auto
text
EOF
VERSION=$(git describe --tags || echo "unknown version")
aws s3 cp bin s3://$S3_BUCKET/$VERSION/ --profile s3 --no-progress --endpoint-url $S3_ENDPOINT --recursive
aws configure --profile s3 <<-EOF > /dev/null 2>&1
null
null
null
text
EOF