name: Publish

on:
  push:
    branches:
      - main
      - master


jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest]

    runs-on: ${{matrix.os}}

    steps:
      - name: Checkout the repo
        uses: actions/checkout@v2

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

      - name: Cache gradle
        uses: actions/cache@v1
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
          restore-keys: |
            ${{ runner.os }}-gradle-

      - name: Cache gradle wrapper
        uses: actions/cache@v1
        with:
          path: ~/.gradle/wrapper
          key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
          restore-keys: |
            ${{ runner.os }}-gradlewrapper-

      - name: Cache maven
        uses: actions/cache@v1
        with:
          path: ~/.m2/repository/
          key: ${{ runner.os }}-maven-${{ hashFiles('**/*.gradle') }}
          restore-keys: |
            ${{ runner.os }}-maven-

      - name: Gradle Publish Plugin
        run: |
          ./gradlew publishPlugin -PintellijPublishToken="${{ secrets.INTELLIJPUBLISHTOKEN }}"  -PpublishChannels=Dev  -Pversion="$(git rev-parse--short HEAD)"
name: Publish

on:
  push:
    branches:
      - main
      - master


jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest]

    runs-on: ${{matrix.os}}

    steps:
      - name: Checkout the repo
        uses: actions/checkout@v2

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

      - name: Cache gradle
        uses: actions/cache@v1
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
          restore-keys: |
            ${{ runner.os }}-gradle-

      - name: Cache gradle wrapper
        uses: actions/cache@v1
        with:
          path: ~/.gradle/wrapper
          key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
          restore-keys: |
            ${{ runner.os }}-gradlewrapper-

      - name: Cache maven
        uses: actions/cache@v1
        with:
          path: ~/.m2/repository/
          key: ${{ runner.os }}-maven-${{ hashFiles('**/*.gradle') }}
          restore-keys: |
            ${{ runner.os }}-maven-

      - name: Gradle Publish Plugin
        run: |
          ./gradlew publishPlugin -PintellijPublishToken="${{ secrets.INTELLIJPUBLISHTOKEN }}"  -PpublishChannels=Dev  -Pversion="$(git rev-parse --short HEAD)"
Fix missing space in git command
Fix missing space in git command
