From 18e17251372668c9095ecb4f2ed8bc7c4783f2b7 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Fri, 15 Mar 2024 10:38:10 +0200 Subject: [PATCH 1/2] fix: lein-modules script should run parent module last ... in order to deploy the project in the right order to clojars --- scripts/lein-modules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lein-modules b/scripts/lein-modules index 41dd834..373a73c 100755 --- a/scripts/lein-modules +++ b/scripts/lein-modules @@ -4,11 +4,11 @@ set -e # Modules for ext in \ - muuntaja \ muuntaja-form \ muuntaja-cheshire \ muuntaja-charred \ muuntaja-msgpack \ - muuntaja-yaml; do + muuntaja-yaml \ + muuntaja; do cd modules/$ext; lein "$@"; cd ../..; done From eac5066c23de87ea3803d3c5587122bf3a9559c3 Mon Sep 17 00:00:00 2001 From: Joel Kaasinen Date: Fri, 15 Mar 2024 10:43:19 +0200 Subject: [PATCH 2/2] ci: prepare for automated releases --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ project.clj | 5 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8efec4e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + release: + types: + - published # reacts to releases and prereleases, but not their drafts + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: "Setup Java 8" + uses: actions/setup-java@v3.12.0 + with: + distribution: zulu + java-version: 8 # build releases with java 8 for maximum compatibility + - name: Setup Clojure + uses: DeLaGuardo/setup-clojure@master + with: + lein: 2.9.4 + - name: Run tests + run: lein do clean, all test, all check + - name: Build jar + run: lein jar + - name: Deploy to Clojars + run: lein deploy + env: + CLOJARS_USER: metosinci + CLOJARS_DEPLOY_TOKEN: "${{ secrets.CLOJARS_DEPLOY_TOKEN }}" diff --git a/project.clj b/project.clj index 5df928c..2e88105 100644 --- a/project.clj +++ b/project.clj @@ -11,6 +11,10 @@ [cheshire "5.10.0"] [clj-commons/clj-yaml "1.0.27"] [clojure-msgpack "1.2.1" :exclusions [org.clojure/clojure]]] + :deploy-repositories [["releases" {:url "https://repo.clojars.org/" + :sign-releases false + :username :env/CLOJARS_USER + :password :env/CLOJARS_DEPLOY_TOKEN}]] :source-paths ["modules/muuntaja/src"] :plugins [[lein-codox "0.10.7"]] :codox {:src-uri "http://github.com/metosin/muuntaja/blob/master/{filepath}#L{line}" @@ -18,7 +22,6 @@ :metadata {:doc/format :markdown}} :scm {:name "git" :url "https://github.com/metosin/muuntaja"} - :deploy-repositories [["releases" :clojars]] :profiles {:dev {:jvm-opts ^:replace ["-server"] ;; all module sources for development