Skip to content

ci

ci #173

Workflow file for this run

name: ci
on:
push:
branches: [main, dss]
tags: ["v*"]
pull_request:
branches: ["*"]
jobs:
build:
runs-on: ${{ matrix.os }}
name: Java ${{ matrix.java }} ${{ matrix.os }}
strategy:
matrix:
java: [8, 11]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Clean and build
run: ./gradlew clean build -Plog-tests
publish:
name: Publish
needs: [build]
if: github.event_name != 'pull_request' && ((github.ref == 'refs/heads/dss') || startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup mill
uses: jodersky/setup-mill@master
with:
mill-version: 0.9.10
- name: Cache mill
uses: coursier/cache-action@v6
- name: Compile
run: mill -k --disable-ticker __.compile
- name: Publish ${{ github.ref }}
run: ./ci/publish.sh && echo "PUBLISH_VERSION=$(mill -k --disable-ticker show lsp.publishVersion | tr -d '\"')" >> $GITHUB_ENV
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}