2019-12-20 14:51:24 +00:00
|
|
|
name: ci
|
|
|
|
|
2021-01-30 17:00:12 +00:00
|
|
|
on: [ push, pull_request ]
|
2019-12-20 14:51:24 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-01-30 17:00:12 +00:00
|
|
|
check:
|
2021-02-10 15:45:16 +00:00
|
|
|
runs-on: macos-latest
|
2019-12-20 14:51:24 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/wrapper
|
|
|
|
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.*') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-wrapper-
|
|
|
|
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches
|
2020-08-26 18:52:18 +00:00
|
|
|
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('buildSrc/src/main/kotlin/Versions.kt') }}
|
2019-12-20 14:51:24 +00:00
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-caches-
|
|
|
|
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
|
|
|
|
- run: ./gradlew check
|
2021-01-30 17:00:12 +00:00
|
|
|
|
|
|
|
publish:
|
|
|
|
needs: check
|
2021-01-30 17:08:00 +00:00
|
|
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && needs.check.result == 'success'
|
2021-02-10 15:45:16 +00:00
|
|
|
runs-on: macos-latest
|
2021-01-30 17:00:12 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/wrapper
|
|
|
|
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.*') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-wrapper-
|
|
|
|
|
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches
|
|
|
|
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('buildSrc/src/main/kotlin/Versions.kt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-caches-
|
|
|
|
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
|
|
|
|
- run: ./gradlew publish
|
|
|
|
env:
|
|
|
|
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
|
|
|
|
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
|
|
|
|
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
|
|
|
|
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
|
|
|
|
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
|