Skip to content

Deploy to Clojars

Deploy to Clojars #10

name: Deploy to Clojars
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4.1.4
- 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 sealog version project.clj | tail -n 1
- 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 sealog version project.clj | tail -n 1)"
- name: Push Tag
uses: hole19/git-tag-action@v1.0
env:
TAG: v${{ steps.versionchk.outputs.VERSION }}
GITHUB_TOKEN: ${{ secrets.WALL_BREW_BOT_PAT }}
# This file was automatically copied and populated by rebroadcast
# Do not edit this file directly, instead modify the source at https://github.com/Wall-Brew-Co/rebroadcast/blob/master/sources/github-actions/workflows/deploy_to_clojars.yml