name: Publish version

on:
  push:
    tags:
      - 'v*'

jobs:
  publish-version:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Setup JDK
      uses: actions/setup-java@v1
      with:
        java-version: 11

    - name: Get version
      run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

    - name: Grant execute permission for gradlew
      run: chmod +x gradlew

    - name: Build and publish to Bintray
      run: ./gradlew bintrayUpload --info
      env:
        RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
        BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
        BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}

Add GitHub Actions workflow for build and publish
Add GitHub Actions workflow for build and publish