Skip to content

Commit

Permalink
ci: prepare for automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
opqdonut committed Mar 15, 2024
1 parent 18e1725 commit eac5066
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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

0 comments on commit eac5066

Please sign in to comment.