Skip to content

Deploy to Clojars

Deploy to Clojars #5

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
- name: Validate Changelog Status
run: lein sealog check
- name: Display Version
run: lein sealog 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 "VERSION=$(lein sealog version project.clj | tail -n 1)" >> $GITHUB_OUTPUT
- name: Push Tag
uses: hole19/[email protected]
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