From b7783e9ea87ac32ee69c56d4b3bf9b12e76472e6 Mon Sep 17 00:00:00 2001 From: Daniel Leong Date: Sat, 20 Mar 2021 11:44:56 -0400 Subject: [PATCH] ci: Move snapshot deploy into the normal CI flow (behind the "if") This simplifies the flow a bit, since we don't have to re-declare everything and don't have to re-fetch dependencies (or reload dependency cache) --- .github/workflows/ci.yml | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70a9cb7..4dcc13b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,29 +30,10 @@ jobs: - name: Verify Lint run: clojure -Sdeps '{:deps {clj-kondo {:mvn/version "RELEASE"}}}' -m clj-kondo.main --lint src --config .clj-kondo/config.edn - deploy-snapshot: - runs-on: ubuntu-latest - needs: build - if: github.ref == 'refs/heads/main' - - steps: - - uses: actions/checkout@v2 - - - name: Extract snapshot version - run: | - echo "VERSION="$(head -n 1 project.clj | cut -d' ' -f 3 | sed 's/"//g') >> $GITHUB_ENV - - - name: Setup clj tools - uses: DeLaGuardo/setup-clojure@master - with: - lein: 2.9.4 - - - name: Release snapshot to Clojars - env: - CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} - CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} - run: | - echo $VERSION - lein deploy clojars - - + - name: Release snapshot to Clojars + if: github.ref == 'refs/heads/main' + env: + CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} + CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} + run: | + lein deploy clojars