diff options
Diffstat (limited to 'release')
-rwxr-xr-x | release/deploy-github.sh | 9 | ||||
-rwxr-xr-x | release/deploy-snapshot.sh | 11 | ||||
-rw-r--r-- | release/keystore.cipher | bin | 0 -> 4336 bytes | |||
-rw-r--r-- | release/props.cipher | 2 | ||||
-rwxr-xr-x | release/signing-cleanup.sh | 7 | ||||
-rwxr-xr-x | release/signing-setup.sh | 13 |
6 files changed, 42 insertions, 0 deletions
diff --git a/release/deploy-github.sh b/release/deploy-github.sh new file mode 100755 index 00000000..42a984c4 --- /dev/null +++ b/release/deploy-github.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +trap 'exit 1' SIGINT SIGTERM + +[ -z "$(command -v hub)" ] && { echo "hub not installed; aborting!"; exit 1; } +TAG="${1}" +hub tag -afs "${TAG:?}" +gradle clean bundleRelease assembleRelease +hub release create "${TAG}" -a app/build/outputs/apk/release/aps_"${TAG}".apk diff --git a/release/deploy-snapshot.sh b/release/deploy-snapshot.sh new file mode 100755 index 00000000..e5d64b0d --- /dev/null +++ b/release/deploy-snapshot.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +export SSHDIR="$HOME/.ssh" +mkdir -p "$SSHDIR" +echo "$ACTIONS_DEPLOY_KEY" > "$SSHDIR/key" +chmod 600 "$SSHDIR/key" +export SERVER_DEPLOY_STRING="$SSH_USERNAME@$SERVER_ADDRESS:$SERVER_DESTINATION" +cd "$GITHUB_WORKSPACE/app/build/outputs/apk/release" +rm output.json +rsync -ahvcr --omit-dir-times --progress --delete --no-o --no-g -e "ssh -i $SSHDIR/key -o StrictHostKeyChecking=no -p $SSH_PORT" . "$SERVER_DEPLOY_STRING" || true +exit 0 diff --git a/release/keystore.cipher b/release/keystore.cipher Binary files differnew file mode 100644 index 00000000..269ed5ef --- /dev/null +++ b/release/keystore.cipher diff --git a/release/props.cipher b/release/props.cipher new file mode 100644 index 00000000..986eab14 --- /dev/null +++ b/release/props.cipher @@ -0,0 +1,2 @@ +Salted__4Ӏ~Oj +r&4Y՝uD~R+s'
[uӯvIه نq/L4OFUx4" #.RW!l#ܑhRq(H"ǶI1S}İҸc c
\ No newline at end of file diff --git a/release/signing-cleanup.sh b/release/signing-cleanup.sh new file mode 100755 index 00000000..babe793e --- /dev/null +++ b/release/signing-cleanup.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# Delete Release key +rm -f keystore.jks + +# Delete signing config +rm -f keystore.properties diff --git a/release/signing-setup.sh b/release/signing-setup.sh new file mode 100755 index 00000000..b60902ee --- /dev/null +++ b/release/signing-setup.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +ENCRYPT_KEY=$1 + +if [[ -n "$ENCRYPT_KEY" ]]; then + # Decrypt Release key + openssl enc -aes-256-cbc -md sha256 -d -in release/keystore.cipher -out keystore.jks -k "${ENCRYPT_KEY}" + + # Decrypt signing config + openssl enc -aes-256-cbc -md sha256 -d -in release/props.cipher -out keystore.properties -k "${ENCRYPT_KEY}" +else + echo "ENCRYPT_KEY is empty" +fi |