Publish dev release
This commit is contained in:
parent
e710c66dcb
commit
8abf58112e
2 changed files with 10 additions and 5 deletions
|
|
@ -2,5 +2,5 @@
|
||||||
:deps {borkdude/gh-release-artifact
|
:deps {borkdude/gh-release-artifact
|
||||||
#_{:local/root "../gh-release-artifact"}
|
#_{:local/root "../gh-release-artifact"}
|
||||||
{:git/url "https://github.com/borkdude/gh-release-artifact"
|
{:git/url "https://github.com/borkdude/gh-release-artifact"
|
||||||
:sha "20ad5cf8fc58635944889b7c0fc38a8bc32f9f99"}}
|
:sha "f34f3e382e6a0ef7f52748b2f27eb681f799a822"}}
|
||||||
:tasks {release-artifact babashka.release-artifact/release}}
|
:tasks {release-artifact babashka.release-artifact/release}}
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,12 @@
|
||||||
:out
|
:out
|
||||||
str/trim)))
|
str/trim)))
|
||||||
|
|
||||||
|
(defn current-version []
|
||||||
|
(-> (slurp "resources/BABASHKA_VERSION")
|
||||||
|
str/trim))
|
||||||
|
|
||||||
(defn release [& args]
|
(defn release [& args]
|
||||||
(let [current-version (-> (slurp "resources/BABASHKA_VERSION")
|
(let [ght (System/getenv "GITHUB_TOKEN")
|
||||||
str/trim)
|
|
||||||
ght (System/getenv "GITHUB_TOKEN")
|
|
||||||
file (first args)
|
file (first args)
|
||||||
branch (current-branch)]
|
branch (current-branch)]
|
||||||
(if (and ght (contains? #{"master" "main"} branch))
|
(if (and ght (contains? #{"master" "main"} branch))
|
||||||
|
|
@ -28,6 +30,9 @@
|
||||||
:repo "babashka-dev-builds"
|
:repo "babashka-dev-builds"
|
||||||
:file file
|
:file file
|
||||||
:tag (str "v" current-version)
|
: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)"))
|
(println "Skipping release artifact (no GITHUB_TOKEN or not on main branch)"))
|
||||||
nil))
|
nil))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue