name: Publish snapshots

on:
  push:
    branches:
      - 'develop'

jobs:
  gradle:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-java@v1
      with:
        java-version: 11
    - uses: eskatos/gradle-command-action@v1
      with:
        arguments: build -x test publish
      env:
        GPR_USERNAME: benfortuna
        GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
        MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
