Skip to content

bump: 0.1.2-SNAPSHOT #7

bump: 0.1.2-SNAPSHOT

bump: 0.1.2-SNAPSHOT #7

Workflow file for this run

name: Clojure CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: check out repo
uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
# Install just one or all simultaneously
# The value must indicate a particular version of the tool, or use 'latest'
# to always provision the latest version
cli: 1.11.4.1474
lein: 2.11.2
cljfmt: latest
# Optional step:
- name: Cache clojure dependencies
uses: actions/cache@v4
with:
path: |
~/.m2/repository
~/.gitlibs
~/.deps.clj
# List all files containing dependencies:
key: cljdeps-${{ hashFiles('project.clj') }}
restore-keys: cljdeps-
- name: Install dependencies
run: lein -U deps
- name: Run tests
run: lein test
- name: Import GPG key
if: github.ref == 'refs/heads/devel' || github.ref == 'refs/heads/master'
run: |
echo -n "$GPG_KEY" | base64 --decode | gpg --import --pinentry-mode=loopback --passphrase "$GPG_PASSPHRASE"
env:
GPG_KEY: ${{ secrets.CLOJARS_SIGN_GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.CLOJARS_SIGN_GPG_PRIVATE_KEY_PASSPHRASE }}
- name: Set up GPG Environnement
if: github.ref == 'refs/heads/devel' || github.ref == 'refs/heads/master'
run: |
echo "no-tty" >> ~/.gnupg/gpg.conf
echo "batch" >> ~/.gnupg/gpg.conf
echo pinentry-mode loopback >> ~/.gnupg/gpg.conf
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo RELOADAGENT | gpg-connect-agent
shell: bash
- name: Sign Jars & Deploy to Clojars
if: github.ref == 'refs/heads/devel' || github.ref == 'refs/heads/master'
run: |
export GPG_TTY=$(tty)
echo "logging" | gpg --sign --passphrase "$GPG_PASSPHRASE" -o /dev/null
lein deploy
env:
GPG_KEY: ${{ secrets.CLOJARS_SIGN_GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.CLOJARS_SIGN_GPG_PRIVATE_KEY_PASSPHRASE }}
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
- name: Generate documentation
if: github.ref == 'refs/heads/master'
run: lein marg -d public -f index.html
- name: Deploy documentation to Github Pages
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/master'
with:
branch: gh-pages
folder: public