name: Build And Test

on: [push, pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        java: [
                8, # Compatibility
                11, # LTS
                13 # Latest
        ]
    steps:
      - name: Check out
        uses: actions/checkout@v2

      - name: Setup JDK ${{ matrix.java }}
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java }}
      - name: Cache Gradle packages
        uses: actions/cache@v1
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
          restore-keys: ${{ runner.os }}-gradle
      - name: Build with Gradle
        run: ./gradlew build
      - name: Archive test results
        uses: actions/upload-artifact@v1
        with:
          name: test-results
          path: configurate-*/build/test-results/test


name: Build And Test

on: [push, pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        java: [
                8, # Compatibility
                11, # LTS
                13 # Latest
        ]
    steps:
      - name: Check out
        uses: actions/checkout@v2

      - name: Setup JDK ${{ matrix.java }}
        uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java }}
      - name: Cache Gradle packages
        uses: actions/cache@v1
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
          restore-keys: ${{ runner.os }}-gradle
      - name: Build with Gradle
        run: ./gradlew build
      - name: Archive test results
        uses: actions/upload-artifact@v2-preview
        with:
          name: test-results
          path: configurate-*/build/test-results/test


Switch to v2 of artifact action
build: Switch to v2 of artifact action

This allows using globs in the path
