Skip to content

Commit

Permalink
Merge pull request #142 from metosin/gha-releases
Browse files Browse the repository at this point in the history
prepare for automated releases
  • Loading branch information
opqdonut committed Mar 15, 2024
2 parents 73b42a5 + eac5066 commit 363a53f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .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 }}"
5 changes: 4 additions & 1 deletion project.clj
Expand Up @@ -11,14 +11,17 @@
[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}"
:output-path "doc"
: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
Expand Down
4 changes: 2 additions & 2 deletions scripts/lein-modules
Expand Up @@ -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

0 comments on commit 363a53f

Please sign in to comment.