Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Deploy to Clojars

Deploy to Clojars #1

name: Deploy to Clojars
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/[email protected]
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: cache-maven
with:
path: ~/.m2
save-always: true
key: ${{ runner.os }}-clj-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-clj
- name: Install Clojure dependencies
run: |
lein deps && lein project-version
- name: Run sanity tests
run: lein test
- name: Run build test
run: lein jar
- name: Publish to Clojars
env:
CLOJARS_USER: ${{ secrets.CLOJARS_USER }}
CLOJARS_PASS: ${{ secrets.CLOJARS_PASS }}
run: lein deploy clojars
- name: Resolve version
id: versionchk
run: echo "::set-output name=VERSION::$(lein project-version)"
- name: Push Tag
uses: hole19/[email protected]
env:
TAG: v${{ steps.versionchk.outputs.VERSION }}
GITHUB_TOKEN: ${{ secrets.WALL_BREW_BOT_PAT }}