name: Release

on: [release]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11
      - name: Cache packages
        uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/wrapper
          key: gradle-${{ hashFiles('**/*.gradle', '**/gradle.properties', '**/gradle/wrapper/*') }}
          restore-keys: |
            gradle-
      - name: Build and check
        run: ./gradlew clean check integrationTest --console plain
      - name: Publish
        run: ./gradlew buildPlugin publishPlugin --console plain -Ppublish=true

name: Release

on:
  push:
    tags:
      - '*'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11
      - name: Cache packages
        uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/wrapper
          key: gradle-${{ hashFiles('**/*.gradle', '**/gradle.properties', '**/gradle/wrapper/*') }}
          restore-keys: |
            gradle-
      - name: Build and check
        run: ./gradlew clean check integrationTest --console plain
      - name: Publish
        run: ./gradlew buildPlugin publishPlugin --console plain -Ppublish=true

Fix push on tag workflow
Fix push on tag workflow
