diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f51ed4f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: deploy +on: + push: + paths: ['src/**'] + workflow_dispatch: + +jobs: + deploy: + name: Deploy to clojars + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: 17 + + - name: Setup Clojure + uses: DeLaGuardo/setup-clojure@11.0 + with: + cli: 'latest' + + - name: Build Jar + run: | + clj -T:build clean + clj -T:build jar + + - name: Deploy to Clojars + run: env CLOJARS_USERNAME=${{ secrets.CLOJARS_USERNAME }} CLOJARS_PASSWORD=${{ secrets.CLOJARS_PASSWORD }} clj -T:build deploy diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..c5d54ec --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.9 diff --git a/build.clj b/build.clj index cc004ff..744a3e9 100644 --- a/build.clj +++ b/build.clj @@ -1,9 +1,10 @@ (ns build (:require [clojure.tools.build.api :as b] + [clojure.string :as str] [deps-deploy.deps-deploy :as dd])) (def lib 'org.clojars.some/depo) -(def version "0.0.8") +(def version (str/trim (slurp "VERSION"))) (def jar-file (format "target/%s-%s.jar" (name lib) version)) (def class-dir "target/classes") (def url "https://github.com/somecho/depo.git") diff --git a/src/depo/core.clj b/src/depo/core.clj index 8397b5e..fd7eb84 100644 --- a/src/depo/core.clj +++ b/src/depo/core.clj @@ -1,5 +1,6 @@ (ns depo.core (:require [cli-matic.core :refer [run-cmd]] + [clojure.string :as str] [depo.readwrite :as rw] [depo.errors :as e])) @@ -18,7 +19,7 @@ (def CONFIGURATION {:command "depo" :description "manage Clojure dependencies easily" - :version "0.0.8" + :version (str/trim (slurp "VERSION")) :opts [{:as "path to configuration file" :default nil :option "file"