This repository has been archived by the owner on Mar 10, 2024. It is now read-only.
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: 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 }} | |