Skip to content

Commit ee7663e

Browse files
committed
Fix: copied and modified the github workflow from the mono repo
1 parent 72fbd6f commit ee7663e

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

.github/workflows/release-sdk.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
---
3+
name: Clojure SDK
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- ./**
10+
- .github/workflows/release-sdk.yml
11+
pull_request:
12+
paths:
13+
- ./**
14+
- .github/workflows/release-sdk.yml
15+
workflow_dispatch:
16+
inputs:
17+
publish:
18+
description: "Publish artifacts to Clojars"
19+
required: true
20+
type: boolean
21+
default: false
22+
jobs:
23+
build-clojure:
24+
runs-on: ubuntu-24.04
25+
defaults:
26+
run:
27+
working-directory: ./
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.22
32+
33+
- name: Setup java 21 as default java
34+
run: |
35+
echo "JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV
36+
echo "$JAVA_HOME_21_X64/bin" >> $GITHUB_PATH
37+
shell: bash
38+
39+
- name: Install clojure + tools
40+
uses: DeLaGuardo/setup-clojure@ada62bb3282a01a296659d48378b812b8e097360 # tag 13.2
41+
with:
42+
cli: latest
43+
bb: latest
44+
45+
- name: Cache clojure dependencies
46+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # tag: v4.2.3
47+
with:
48+
path: |
49+
~/.m2/repository
50+
~/.gitlibs
51+
~/.deps.clj
52+
key: cljdeps-${{ hashFiles('**/deps.edn') }}
53+
restore-keys: cljdeps-
54+
55+
- name: Run test suite
56+
run: bb test:all
57+
58+
- name: Build jar artifacts
59+
run: bb jar:all
60+
61+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
62+
with:
63+
name: sdk.jar
64+
path: sdk/target/*.jar
65+
if-no-files-found: error
66+
compression-level: 0
67+
68+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
69+
with:
70+
name: adapter-http-kit.jar
71+
path: sdk-adapter-http-kit/target/*.jar
72+
if-no-files-found: error
73+
compression-level: 0
74+
75+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
76+
with:
77+
name: adapter-ring.jar
78+
path: sdk-adapter-ring/target/*.jar
79+
if-no-files-found: error
80+
compression-level: 0
81+
82+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
83+
with:
84+
name: adapter-ring.jar
85+
path: sdk-malli-schemas/target/*.jar
86+
if-no-files-found: error
87+
compression-level: 0
88+
89+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag: v4.6.2
90+
with:
91+
name: adapter-ring.jar
92+
path: sdk-brotli/target/*.jar
93+
if-no-files-found: error
94+
compression-level: 0
95+
96+
- name: Publish artifacts to clojars
97+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true'
98+
run: bb publish:all

0 commit comments

Comments
 (0)