diff --git a/.github/workflows/clojure.yml b/.github/workflows/clojure.yml index fbabe71..9b0d614 100644 --- a/.github/workflows/clojure.yml +++ b/.github/workflows/clojure.yml @@ -67,14 +67,14 @@ 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: | - git config --global user.email "bot@metosin.com" - git config --global user.name "Metosin Automated Release" if [[ "$COMMIT_MSG" == "Release :major" ]]; then lein release :major elif [[ "$COMMIT_MSG" == "Release :minor" ]]; then @@ -84,3 +84,5 @@ jobs: else lein deploy snapshot fi + - run: rm -f ~/.m2/settings.xml + if: ${{ always }} diff --git a/project.clj b/project.clj index fac5e82..01a0398 100644 --- a/project.clj +++ b/project.clj @@ -36,12 +36,8 @@ :src-uri "http://github.com/metosin/ring-swagger/blob/master/" :src-uri-prefix "#L"} :deploy-repositories [["snapshot" {:url "https://clojars.org/repo" - :username :env/clojars_user - :password :env/clojars_token :sign-releases false}] ["release" {:url "https://clojars.org/repo" - :username :env/clojars_user - :password :env/clojars_token :sign-releases false}]] :release-tasks [["clean"] ["vcs" "assert-committed"]