build: only try to upload when there is a release
This commit is contained in:
parent
0700f86a9e
commit
c129b5f86a
1 changed files with 7 additions and 4 deletions
|
@ -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.
|
||||||
|
if ls dmoonfire* &> /dev/null
|
||||||
|
then
|
||||||
export npm_package_name=$(cat package.json | jq -r .name)
|
export npm_package_name=$(cat package.json | jq -r .name)
|
||||||
tar -cjf $npm_package_name.tar.bz2 dmoonfire*
|
tar -cjf $npm_package_name.tar.bz2 dmoonfire*
|
||||||
s3cmd --access_key=$AWS_ACCESS_KEY_ID --access_token=$AWS_SECRET_ACCESS_KEY
|
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
|
||||||
--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
|
||||||
|
|
Loading…
Reference in a new issue