name: "Release Master"

# Run workflow on commits to the `master` branch
on:
  push:
    branches:
      - master

jobs:
  release:
    if: "!contains(github.event.head_commit.message, 'skip ci')"
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v2

      - name: Install Java and Maven
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Adding ssh key
        uses: webfactory/ssh-agent@v0.4.1
        with:
          ssh-private-key: ${{ secrets.ssh_private_key }}

      - name: Git configuration
        run: |
          git config user.email "ci@wmixvideo.com.br"
          git config user.name "Wmix CI"

      - name: Release Maven package
        uses: samuelmeuli/action-maven-publish@v1.4.0
        with:
          gpg_private_key: ${{ secrets.gpg_private_key }}
          gpg_passphrase: ${{ secrets.gpg_passphrase }}
          nexus_username: ${{ secrets.nexus_username }}
          nexus_password: ${{ secrets.nexus_password }}
          maven_goals_phases: clean -B release:prepare release:perform -Dgpg.passphrase=${{ secrets.gpg_passphrase }} -Darguments="-DskipTests"

name: "Release Master"

# Run workflow on commits to the `master` branch
on:
  push:
    branches:
      - master

jobs:
  release:
    if: "!contains(github.event.head_commit.message, 'skip ci')"
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v2

      - name: Install Java and Maven
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Adding ssh key
        uses: webfactory/ssh-agent@v0.4.1
        with:
          ssh-private-key: ${{ secrets.ssh_private_key }}

      - name: Git configuration
        run: |
          git config user.email "ci@wmixvideo.com.br"
          git config user.name "Wmix CI"

      - name: Release Maven package
        uses: samuelmeuli/action-maven-publish@v1.4.0
        with:
          gpg_private_key: ${{ secrets.gpg_private_key }}
          gpg_passphrase: ${{ secrets.gpg_passphrase }}
          nexus_username: ${{ secrets.nexus_username }}
          nexus_password: ${{ secrets.nexus_password }}
          maven_goals_phases: clean -B release:prepare release:perform -Darguments="-DskipTests"

Remove a chave da gpg
Remove a chave da gpg
