Skip to content

Commit 2f27cef

Browse files
committed
Fix the update-spec.yml GitHub workflow (deploy fails)
1 parent 3272614 commit 2f27cef

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/update-spec.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616
with:
1717
token: ${{ secrets.PERSONAL_TOKEN }}
18+
fetch-depth: 0 # full history for version number
1819

1920
- name: Configure Git user
2021
run: |
@@ -42,7 +43,7 @@ jobs:
4243
env:
4344
BOT_AUTH_TOKEN: ${{ secrets.BOT_AUTH_TOKEN }}
4445
run: |
45-
clojure -T:build ci
46+
clojure -T:build test
4647
4748
- name: Commit and push when changed
4849
if: steps.update-spec.outputs.updated == 'true'
@@ -52,6 +53,10 @@ jobs:
5253
git commit -m "Update Telegram Bot API spec [skip ci]"
5354
git push
5455
56+
- name: Build JAR file
57+
if: steps.update-spec.outputs.updated == 'true'
58+
run: clojure -T:build jar
59+
5560
- name: Deploy to Clojars
5661
if: steps.update-spec.outputs.updated == 'true'
5762
env:

build.clj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676
:src-dirs ["src"]
7777
:pom-data (pom-template version)))
7878

79-
(defn ci "Run the CI pipeline of tests (and build the JAR)." [opts]
80-
(test opts)
79+
(defn jar "Builds the JAR file." [opts]
8180
(b/delete {:path "target"})
8281
(let [opts (jar-opts opts)]
8382
(println "\nWriting pom.xml...")
@@ -88,13 +87,20 @@
8887
(b/jar opts))
8988
opts)
9089

90+
(defn ci "Run the CI pipeline: check, test, build the JAR." [opts]
91+
;; TODO: Add 'check' step (linters, formatter).
92+
(-> opts
93+
(test)
94+
(jar)))
95+
9196
(defn install "Install the JAR locally." [opts]
9297
(let [opts (jar-opts opts)]
9398
(b/install opts))
9499
opts)
95100

96101
(defn deploy "Deploy the JAR to Clojars." [opts]
97102
(let [{:keys [jar-file] :as opts} (jar-opts opts)]
98-
(dd/deploy {:installer :remote :artifact (b/resolve-path jar-file)
103+
(dd/deploy {:installer :remote
104+
:artifact (b/resolve-path jar-file)
99105
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))}))
100106
opts)

0 commit comments

Comments
 (0)