diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..21bb9c9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,45 @@ +name: Release + +on: + release: + types: + - published # reacts to releases and pre-releases, but not their drafts + +jobs: + + test-and-release: + + name: Release + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Java 8 + uses: actions/setup-java@v1.4.3 + with: + java-version: 8 + + - uses: actions/setup-node@v4 + with: + node-version: lts/hydrogen + + - name: Setup Clojure + uses: DeLaGuardo/setup-clojure@master + with: + cli: latest + + - run: npm ci + + - name: Run the CLJ and CLJS tests + run: ./bin/kaocha + + - name: Build the jar and update pom.xml's version + run: clojure -X:jar + + - name: Deploy the jar and pom files to Clojars + run: clojure -X:deploy + env: + CLOJARS_USERNAME: metosinci + CLOJARS_PASSWORD: "${{ secrets.CLOJARS_DEPLOY_TOKEN }}" diff --git a/.gitignore b/.gitignore index 2ff564f..db3f733 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ out/ .cljs_node_repl/ *.iml +*.jar diff --git a/deps.edn b/deps.edn index 0cdce0b..a2b4687 100644 --- a/deps.edn +++ b/deps.edn @@ -3,7 +3,8 @@ ;; No deps ^_^ :deps {} - :aliases {:test {:extra-paths ["test"] + :aliases {;; ./bin/kaocha --watch + :test {:extra-paths ["test"] :extra-deps {org.clojure/clojure {:mvn/version "1.12.0"} org.clojure/clojurescript {:mvn/version "1.11.132"} lambdaisland/kaocha {:mvn/version "1.91.1392"} @@ -11,21 +12,25 @@ org.clojure/test.check {:mvn/version "1.1.1"}} :main-opts ["-m" "kaocha.runner"]} - ; clojure -M:outdated --upgrade + ;; clojure -M:outdated --upgrade :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.11.1260"}} :main-opts ["-m" "antq.core"]} - :depstar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.303"}} - :exec-fn hf.depstar/jar - :exec-args {:sync-pom true - :group-id "fi.metosin" - :artifact-id "signaali" - :version "0.1.0" - :jar "signaali.jar"}}}} + :jar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.303"}} + :exec-fn hf.depstar/jar + :exec-args {:sync-pom true + :group-id "fi.metosin" + :artifact-id "signaali" + :version "0.1.0" + :jar "signaali.jar"}} -;; Memo for deploying a new release: -;; - Change the version above, then build the jar: -;; clojure -X:depstar -;; - add a tag "v0.x.y" to the latest commit and push to repo -;; - deploy: -;; mvn deploy:deploy-file -Dfile=signaali.jar -DpomFile=pom.xml -DrepositoryId=clojars -Durl=https://clojars.org/repo/ + :deploy {:extra-deps {slipset/deps-deploy {:mvn/version "0.2.2"}} + :exec-fn deps-deploy.deps-deploy/deploy + :exec-args {:installer :remote + :sign-releases? true + :artifact "signaali.jar"}}}} + +;; Memo for making a new release: +;; 1. Change the version "0.x.y" above, commit it, push it to Github. +;; 2. In Github's website, create a release. +;; The tag name should be in the format "v0.x.y" diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..bf0ae7e --- /dev/null +++ b/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + jar + fi.metosin + signaali + 0.1.0 + signaali + Small, portable and flexible implementation of signals + 2023 + + + EPL-2.0 + https://opensource.org/license/EPL-2.0 + + + + https://github.com/metosin/signaali + scm:git:git://github.com/metosin/signaali.git + scm:git:ssh://git@github.com/metosin/signaali.git + main + + + + org.clojure + clojure + 1.10.3 + + + + src + + + + clojars + https://repo.clojars.org/ + + +