Publish dev release

This commit is contained in:
Michiel Borkent 2021-12-26 23:11:58 +01:00
parent e710c66dcb
commit 8abf58112e
2 changed files with 10 additions and 5 deletions

View file

@ -2,5 +2,5 @@
:deps {borkdude/gh-release-artifact
#_{:local/root "../gh-release-artifact"}
{:git/url "https://github.com/borkdude/gh-release-artifact"
:sha "20ad5cf8fc58635944889b7c0fc38a8bc32f9f99"}}
:sha "f34f3e382e6a0ef7f52748b2f27eb681f799a822"}}
:tasks {release-artifact babashka.release-artifact/release}}

View file

@ -11,10 +11,12 @@
:out
str/trim)))
(defn current-version []
(-> (slurp "resources/BABASHKA_VERSION")
str/trim))
(defn release [& args]
(let [current-version (-> (slurp "resources/BABASHKA_VERSION")
str/trim)
ght (System/getenv "GITHUB_TOKEN")
(let [ght (System/getenv "GITHUB_TOKEN")
file (first args)
branch (current-branch)]
(if (and ght (contains? #{"master" "main"} branch))
@ -28,6 +30,9 @@
:repo "babashka-dev-builds"
:file file
:tag (str "v" current-version)
:draft false}))
;; do not set, because we are posting to another repo
:target-commitish false
:draft false
:prerelease true}))
(println "Skipping release artifact (no GITHUB_TOKEN or not on main branch)"))
nil))