summaryrefslogtreecommitdiff
path: root/ci/release.py
diff options
context:
space:
mode:
Diffstat (limited to 'ci/release.py')
-rwxr-xr-xci/release.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/ci/release.py b/ci/release.py
index c59c6811..a385ba40 100755
--- a/ci/release.py
+++ b/ci/release.py
@@ -1,17 +1,20 @@
#!/usr/bin/env python
from subprocess import check_call
+import tempfile
import os, base64
check_call(["sbt", "bin/test:assembly"])
is_master_commit = (
- os.environ["TRAVIS_PULL_REQUEST"] == "false" &&
- (os.environ["TRAVIS_BRANCH"] == "master" || os.environ["TRAVIS_TAG"] != "")
+ os.environ["TRAVIS_PULL_REQUEST"] == "false" and
+ (os.environ["TRAVIS_BRANCH"] == "master" or os.environ["TRAVIS_TAG"] != "")
)
-with open("~/gpg.key", "w") as f:
+_, tmp = tempfile.mkstemp()
+
+with open(tmp, "w") as f:
f.write(base64.b64decode(os.environ["GPG_PRIVATE_KEY_B64"]))
-check_call(["gpg", "--import", "~/gpg.key"])
+check_call(["gpg", "--import", tmp])
check_call([
"target/bin/mill",