safe-react/scripts/github/prepare_production_deployment.sh
Daniel Sanchez 870509eecf
Migrate to GitHub actions (#1924)
* Add Github action for each network environment

* Disable travis build

* Move deploy scripts to new folder

* Adapt deploy scripts to Github actions

* Run coveralls only if tests succeed

* Upload sentry source map

* Add Production flag for tagged builds

* Use coveralls Github Action

* Add debug steps to all networks for first release test
2021-02-24 17:24:25 +01:00

17 lines
501 B
Bash
Executable File

#!/bin/bash
set -ev
# Only:
# - Tagged commits
# - Security env variables are available.
if [ -n "$VERSION_TAG" ] && [ -n "$PROD_DEPLOYMENT_HOOK_TOKEN" ] && [ -n "$PROD_DEPLOYMENT_HOOK_URL" ]
then
curl --silent --output /dev/null --write-out "%{http_code}" -X POST \
-F token="$PROD_DEPLOYMENT_HOOK_TOKEN" \
-F ref=master \
-F "variables[TRIGGER_RELEASE_COMMIT_TAG]=$VERSION_TAG" \
$PROD_DEPLOYMENT_HOOK_URL
else
echo "[ERROR] Production deployment could not be prepared"
fi