Release :patch #446
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
BABASHKA_VERSION: "0.10.163" | |
jobs: | |
test: | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
jdk: ['8', '11', '17', '21', '22'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/project.clj') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Prepare java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.jdk }} | |
- name: Install clojure tools | |
uses: DeLaGuardo/setup-clojure@3.5 | |
with: | |
lein: 2.9.6 | |
- run: lein test | |
deploy: | |
concurrency: deploy | |
needs: test | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'frenchy64' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# see ./scripts/deploy-doc.sh | |
- name: gh-pages clone | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
path: tmp/fully-satisfies-gh-pages | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/project.clj') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- uses: turtlequeue/setup-babashka@5e0acf2cf146558d93a573e339e1d24f2758adfd | |
with: | |
babashka-version: ${{env.BABASHKA_VERSION}} | |
- name: Prepare java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: deploy | |
env: | |
CLOJARS_USER: ${{ secrets.CLOJARS_USER }} | |
CLOJARS_TOKEN: ${{ secrets.CLOJARS_TOKEN }} | |
COMMIT_MSG: ${{ github.event.head_commit.message }} | |
run: | | |
git config --global user.email "abonnairesergeant@gmail.com" | |
git config --global user.name "Ambrose Bonnaire-Sergeant" | |
if [[ "$COMMIT_MSG" == "Release :major" ]]; then | |
lein release :major | |
elif [[ "$COMMIT_MSG" == "Release :minor" ]]; then | |
lein release :minor | |
elif [[ "$COMMIT_MSG" == "Release :patch" ]]; then | |
lein release :patch | |
else | |
lein deploy snapshot | |
fi |