|
40 | 40 |
|
41 | 41 | # run tests!
|
42 | 42 | - run: lein test
|
| 43 | + |
| 44 | + deploy: |
| 45 | + docker: |
| 46 | + # specify the version you desire here |
| 47 | + - image: circleci/clojure:openjdk-8-lein-2.9.1 |
| 48 | + # Specify service dependencies here if necessary |
| 49 | + # CircleCI maintains a library of pre-built images |
| 50 | + # documented at https://circleci.com/docs/2.0/circleci-images/ |
| 51 | + # - image: circleci/postgres:9.4 |
| 52 | + |
| 53 | + working_directory: ~/repo |
| 54 | + |
| 55 | + environment: |
| 56 | + LEIN_ROOT: "true" |
| 57 | + # Customize the JVM maximum heap limit |
| 58 | + JVM_OPTS: -Xmx3200m |
| 59 | + |
| 60 | + steps: |
| 61 | + - checkout |
| 62 | + |
| 63 | + # Download and cache dependencies |
| 64 | + - restore_cache: |
| 65 | + keys: |
| 66 | + - v1-dependencies-{{ checksum "project.clj" }} |
| 67 | + # fallback to using the latest cache if no exact match is found |
| 68 | + - v1-dependencies- |
| 69 | + |
| 70 | + # Download and cache dependencies |
| 71 | + - restore_cache: |
| 72 | + keys: |
| 73 | + - v1-dependencies-{{ checksum "project.clj" }} |
| 74 | + # fallback to using the latest cache if no exact match is found |
| 75 | + - v1-dependencies- |
| 76 | + |
| 77 | + - run: |
| 78 | + name: Install babashka |
| 79 | + command: | |
| 80 | + curl -s https://raw.githubusercontent.com/borkdude/babashka/master/install -o install.sh |
| 81 | + sudo bash install.sh |
| 82 | + rm install.sh |
| 83 | + - run: |
| 84 | + name: Install deployment-script |
| 85 | + command: | |
| 86 | + curl -s https://raw.githubusercontent.com/clj-commons/infra/main/deployment/circle-maybe-deploy.bb -o circle-maybe-deploy.bb |
| 87 | + chmod a+x circle-maybe-deploy.bb |
| 88 | +
|
| 89 | + - run: lein deps |
| 90 | + |
| 91 | + - run: |
| 92 | + name: Setup GPG signing key |
| 93 | + command: | |
| 94 | + GNUPGHOME="$HOME/.gnupg" |
| 95 | + export GNUPGHOME |
| 96 | + mkdir -p "$GNUPGHOME" |
| 97 | + chmod 0700 "$GNUPGHOME" |
| 98 | +
|
| 99 | + echo "$GPG_KEY" \ |
| 100 | + | base64 --decode --ignore-garbage \ |
| 101 | + | gpg --batch --allow-secret-key-import --import |
| 102 | +
|
| 103 | + gpg --keyid-format LONG --list-secret-keys |
| 104 | +
|
| 105 | + - save_cache: |
| 106 | + paths: |
| 107 | + - ~/.m2 |
| 108 | + key: v1-dependencies-{{ checksum "project.clj" }} |
| 109 | + - run: |
| 110 | + name: Deploy |
| 111 | + command: | |
| 112 | + GPG_TTY=$(tty) |
| 113 | + export GPG_TTY |
| 114 | + echo $GPG_TTY |
| 115 | + ./circle-maybe-deploy.bb lein deploy clojars |
0 commit comments