Next development version '1.6.19-SNAPSHOT'. #783
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: Java CI | |
on: | |
push: | |
branches: | |
- 'master' | |
- '1.5.x' | |
- '1.6.x' | |
tags-ignore: | |
- '*.*' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: Build for JDK ${{ matrix.java }} | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'Discord4J/discord-json' }} | |
strategy: | |
matrix: | |
java: [ 11 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Build with Gradle | |
run: ./gradlew build | |
release: | |
name: Publish artifacts | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
needs: build | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Publish with Gradle | |
run: ./gradlew -x test publish | |
env: | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.signingKey }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.signingPassword }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.sonatypeUsername }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.sonatypePassword }} |