build: only try to upload when there is a release

This commit is contained in:
D. Moonfire 2022-08-12 11:24:50 -05:00
parent 0700f86a9e
commit c129b5f86a

View file

@ -17,10 +17,13 @@ rm -f dmoonfire*
npx semantic-release npx semantic-release
# Create a tarball of the output files and upload them to S3. # Create a tarball of the output files and upload them to S3.
export npm_package_name=$(cat package.json | jq -r .name) if ls dmoonfire* &> /dev/null
tar -cjf $npm_package_name.tar.bz2 dmoonfire* then
s3cmd --access_key=$AWS_ACCESS_KEY_ID --access_token=$AWS_SECRET_ACCESS_KEY export npm_package_name=$(cat package.json | jq -r .name)
--host=$AWS_ENDPOINT --host-bucket=$AWS_ENDPOINT -P put allegro.tar.bz2 s3://$AWS_BUCKET tar -cjf $npm_package_name.tar.bz2 dmoonfire*
s3cmd --access_key=$AWS_ACCESS_KEY_ID --access_token=$AWS_SECRET_ACCESS_KEY --host=$AWS_ENDPOINT --host-bucket=$AWS_ENDPOINT -P put allegro.tar.bz2 s3://$AWS_BUCKET
fi
# Versions # Versions
# 2022-08-12 Added an if check for files before uploading
# 2022-08-11 - Initial version # 2022-08-11 - Initial version