29 lines
847 B
YAML
29 lines
847 B
YAML
name: Gradle
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up JDK 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- name: Cache Gradle packages
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
|
restore-keys: ${{ runner.os }}-gradle
|
|
- name: Build with Gradle
|
|
run: ./gradlew --continue verifyGoogleJavaFormat build connectedCheck
|
|
- name: Publish snapshot
|
|
if: github.event_name == 'push'
|
|
env:
|
|
OSSRH_DEPLOY_USERNAME: ${{ secrets.OSSRH_DEPLOY_USERNAME }}
|
|
OSSRH_DEPLOY_PASSWORD: ${{ secrets.OSSRH_DEPLOY_PASSWORD }}
|
|
run: ./publish-snapshot-on-commit.sh
|