Skip to content

Commit

Permalink
Attempt to deploy snapshot to clojars
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilmo Raunio committed Sep 14, 2023
1 parent e88c194 commit 03f4772
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ jobs:
cli: latest
- name: Build jar
run: clojure -T:build jar
# TODO
# - name: Deploy to Clojars
# run: lein deploy clojars
# env:
# CLOJARS_USER: opqdonut
# CLOJARS_DEPLOY_TOKEN: "${{ secrets.CLOJARS_DEPLOY_TOKEN }}"
- name: Deploy to Clojars
run: clj -X:deploy
env:
CLOJARS_USERNAME: ilmoraunio
CLOJARS_PASSWORD: "${{ secrets.CLOJARS_DEPLOY_TOKEN }}"
11 changes: 4 additions & 7 deletions build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
(def version "0.0.1")
(def is-release (Boolean/parseBoolean (System/getenv "RELEASE")))
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file-name (format "%s/%s-%s.jar"
build-folder
(name lib-name)
(if is-release
version
(str version "-SNAPSHOT"))))
(def jar-file-name (format "%s/%s.jar" build-folder (name lib-name)))

(defn clean [_]
(b/delete {:path build-folder})
Expand All @@ -25,7 +20,9 @@
:target-dir jar-content})
(b/write-pom {:class-dir jar-content
:lib lib-name
:version version
:version (if is-release
version
(str version "-SNAPSHOT"))
:basis basis
:src-dirs ["src"]})
(b/jar {:class-dir jar-content
Expand Down
7 changes: 6 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@
:clojure-10 {:extra-deps {org.clojure/clojure {:mvn/version "1.10.3"}}}
:clojure-11 {}
:build {:deps {io.github.clojure/tools.build {:git/tag "v0.8.1" :git/sha "7d40500"}}
:ns-default build}}}
:ns-default build}
:deploy {:extra-deps {slipset/deps-deploy {:mvn/version "RELEASE"}}
:exec-fn deps-deploy.deps-deploy/deploy
:exec-args {:installer :remote
:sign-releases? false
:artifact "target/oksa.jar"}}}}

0 comments on commit 03f4772

Please sign in to comment.