Skip to content

Commit

Permalink
ci: Move snapshot deploy into the normal CI flow (behind the "if")
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
dhleong committed Mar 20, 2021
1 parent 877e818 commit b7783e9
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b7783e9

Please sign in to comment.