Merge pull request #49 from disneystreaming/dfrancoeur/dss-update #160
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: ci | |
on: | |
push: | |
branches: [dss] | |
tags: ["v*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [8, 11, 17] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
name: Java ${{ matrix.java }} ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: coursier/setup-action@v1 | |
with: | |
jvm: adoptium:${{ matrix.java }} | |
- name: Clean and build | |
run: ./gradlew clean build -Plog-tests | |
publish: | |
strategy: | |
matrix: | |
java: [11] | |
os: [ubuntu-latest] | |
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@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: coursier/setup-action@v1 | |
with: | |
jvm: adoptium:${{ matrix.java }} | |
apps: mill | |
- 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 }} |