name: Publish to GitHub Packages
on: push
jobs:
  publish:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Cache Maven artifacts
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Build and publish package
        run: |
          mvn -B versions:set -DnewVersion=$GITHUB_SHA -DgenerateBackupPoms=false
          mvn -B -Dmaven.test.skip=true -Dskip.installnodenpm -Dskip.npm -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


name: Publish to GitHub Packages
on: push
jobs:
  publish:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: 1.8
      - name: Cache Maven artifacts
        uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Build and publish package
        run: |
          mvn -B versions:set -DnewVersion=$GITHUB_SHA -DgenerateBackupPoms=false
          mvn -B -DskipTests -Dskip.installnodenpm -Dskip.npm -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


Revert "Skip test compilation for github packages"
Revert "Skip test compilation for github packages"

Maven does not understand that if we want to skip test compilation it does not need dependencies with test scopes...
