-
Notifications
You must be signed in to change notification settings - Fork 11
53 lines (45 loc) · 1.44 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Push to Clojars
on:
push:
tags:
- "v*"
jobs:
push-to-clojars:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Clojure
uses: DeLaGuardo/setup-clojure@5.0
with:
cli: 1.11.1.1113
lein: 2.9.8
- name: Cache clojure dependencies
uses: actions/cache@v3
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
key: cljdeps-${{ hashFiles('deps.edn') }}
# key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
# key: cljdeps-${{ hashFiles('project.clj') }}
# key: cljdeps-${{ hashFiles('build.boot') }}
restore-keys: cljdeps-
- name: Setup babashka
run: |
curl -L https://github.com/borkdude/babashka/releases/download/v0.2.5/babashka-0.2.5-linux-amd64.zip -o bb.zip
unzip bb.zip
chmod +x bb
sudo mv bb /usr/bin
- name: Set TAG env variable
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Deploy to Clojars
env:
CLOJARS_LOGIN: ${{ secrets.CLOJARS_LOGIN }}
CLOJARS_USERNAME: ${{ secrets.CLOJARS_LOGIN }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }}
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
TAG: ${{ env.TAG }}
run: /usr/bin/bb ./.github/clojars_deploy.clj