From 75da4a73d739e0cf77c905588052858780705511 Mon Sep 17 00:00:00 2001 From: Ambrose Bonnaire-Sergeant Date: Wed, 20 Dec 2023 14:20:55 -0600 Subject: [PATCH] use env for deploy --- .github/workflows/clojure.yml | 8 ++------ project.clj | 8 ++++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/clojure.yml b/.github/workflows/clojure.yml index a459e3e..2d3c8d0 100644 --- a/.github/workflows/clojure.yml +++ b/.github/workflows/clojure.yml @@ -68,12 +68,10 @@ jobs: with: distribution: 'adopt' java-version: '11' - - name: Configure settings.xml - run: | - mkdir -p ~/.m2 - echo "${{ secrets.CLOJARS_USER }}${{ secrets.CLOJARS_TOKEN }}" > ~/.m2/settings.xml - name: deploy env: + CLOJARS_USER: ${{ secrets.CLOJARS_USER }} + CLOJARS_TOKEN: ${{ secrets.CLOJARS_TOKEN }} COMMIT_MSG: ${{ github.event.head_commit.message }} run: | if [[ "$COMMIT_MSG" == "Release :major" ]]; then @@ -85,5 +83,3 @@ jobs: else lein deploy snapshot fi - - run: rm -f ~/.m2/settings.xml - if: ${{ always() }} diff --git a/project.clj b/project.clj index bacf3f6..925e9ff 100644 --- a/project.clj +++ b/project.clj @@ -36,9 +36,13 @@ :src-uri "http://github.com/metosin/ring-swagger/blob/master/" :src-uri-prefix "#L"} :deploy-repositories [["snapshot" {:url "https://clojars.org/repo" + :username [:gpg :env/clojars_user] + :password [:gpg :env/clojars_token] :sign-releases false}] - ["release" {:url "https://clojars.org/repo" - :sign-releases false}]] + ["releases" {:url "https://clojars.org/repo" + :username [:gpg :env/clojars_user] + :password [:gpg :env/clojars_token] + :sign-releases false}]] :release-tasks [["clean"] ["vcs" "assert-committed"] ["change" "version" "leiningen.release/bump-version" "release"]