Add github action to deploy to clojars #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build and Deploy to Clojars | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'amazon-corretto' | |
- name: Install Leiningen | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y leiningen | |
- name: Build the project | |
run: lein uberjar | |
- name: Deploy to Clojars | |
env: | |
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | |
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} | |
run: | | |
echo 'Deploying to Clojars...' | |
lein deploy clojars |