Skip to content

Commit 76854bd

Browse files
committed
added release.yml
1 parent cbf16de commit 76854bd

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
push:
3+
tags:
4+
- "*"
5+
6+
jobs:
7+
clojars:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
# This step checks out a copy of your repository.
12+
- uses: actions/checkout@v4.2.2
13+
14+
- name: Install clojure tools
15+
uses: DeLaGuardo/setup-clojure@13.5.2
16+
with:
17+
cli: 1.12.4.1618
18+
19+
- name: create pom
20+
run: clojure -T:build generate-pom
21+
22+
- uses: jlesquembre/clojars-publish-action@0.4
23+
env:
24+
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
25+
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}

build.clj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
(def lib 'org.scicloj/scicloj.ml.tribuo)
77
(def version "0.2")
8+
(def basis (b/create-basis {:project "deps.edn"}))
89
#_ ; alternatively, use MAJOR.MINOR.COMMITS:
910
(def version (format "1.0.%s" (b/git-count-revs nil)))
1011
(def class-dir "target/classes")
@@ -67,3 +68,12 @@
6768
(dd/deploy {:installer :remote :artifact (b/resolve-path jar-file)
6869
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))}))
6970
opts)
71+
72+
(defn generate-pom [_]
73+
(b/write-pom {:class-dir class-dir
74+
:target "."
75+
:lib lib
76+
:version version
77+
:basis basis
78+
:pom-data (pom-template version)
79+
:src-dirs ["src"]}))

0 commit comments

Comments
 (0)