Skip to content

Commit

Permalink
use VERSION file and setup deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
somecho committed Jul 2, 2023
1 parent e2413da commit c0fce87
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.9
3 changes: 2 additions & 1 deletion build.clj
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
3 changes: 2 additions & 1 deletion src/depo/core.clj
Original file line number Diff line number Diff line change
@@ -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]))

Expand All @@ -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"
Expand Down

0 comments on commit c0fce87

Please sign in to comment.