-
-
Notifications
You must be signed in to change notification settings - Fork 26
53 lines (42 loc) · 1.08 KB
/
build-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: Build and deploy
on:
push:
branches:
- '**'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
paths:
- '.github/workflows/**'
- 'src/**'
- 'test/**'
- 'test_projects/**'
- project.clj
- deps.edn
jobs:
build:
runs-on: ubuntu-latest
env:
CLOJARS_TOKEN: ${{ secrets.CLOJARS_DEPLOY_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: |
echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV
echo "$JAVA_HOME_21_X64/bin" >> $GITHUB_PATH
- name: Setup Clojure
uses: DeLaGuardo/[email protected]
with:
cli: latest
- run: ./script/test.sh
- if: ${{ startsWith(github.ref, 'refs/tags/') }}
name: Set version
run: |
sed -i 's/"0.0.0"/"${{ github.ref_name }}"/g' project.clj
- run: lein jar
- if: ${{ startsWith(github.ref, 'refs/tags/') }}
name: Deploy to Clojars
run: |
lein deploy clojars
- uses: actions/upload-artifact@v4
with:
name: jar
path: 'target/*.jar'