name: Deploy releases

on:
  create:
    tags: v*

env:
  MVN_ARGS: --batch-mode --errors --fail-fast --no-transfer-progress

jobs:
  default:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-java@v1
        with:
          java-version: 8
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD

      - name: Cache local Maven repository
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-maven-

      - name: Install gpg secret key
        run: |
          gpg --batch --import <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}")
          gpg --list-secret-keys --keyid-format LONG

      - id: publish-to-central
        name: Publish to Central Repository
        run: |
          mvn ${MVN_ARGS} -DskipTests -Psign clean deploy
        env:
          GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

name: Deploy releases

on:
  push:
    tags:
      - 'v*'

env:
  MVN_ARGS: --batch-mode --errors --fail-fast --no-transfer-progress

jobs:
  default:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: actions/setup-java@v1
        with:
          java-version: 8
          server-id: ossrh
          server-username: MAVEN_USERNAME
          server-password: MAVEN_PASSWORD

      - name: Cache local Maven repository
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-maven-

      - name: Install gpg secret key
        run: |
          gpg --batch --import <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}")
          gpg --list-secret-keys --keyid-format LONG

      - id: publish-to-central
        name: Publish to Central Repository
        run: |
          mvn ${MVN_ARGS} -DskipTests -Psign clean deploy
        env:
          GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

Fix wrong github action trigger for deploy
Fix wrong github action trigger for deploy
