Fix for deprecated of set-output
in GH actions (#183)
#67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will test and build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Test and Package | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: [ master ] | |
paths-ignore: | |
- '**.md' | |
release: | |
types: [ prereleased, released ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: maven | |
- name: Run Java tests | |
run: mvn --batch-mode --update-snapshots test | |
- name: Persist Java tests reports | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Test reports | |
path: | | |
gtfs-realtime-validator-lib/target/surefire-reports | |
gtfs-realtime-validator-webapp/target/surefire-reports | |
package: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: maven | |
- name: Deploy to Github Package Registry | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' | |
env: | |
GITHUB_ACTOR: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn --batch-mode --update-snapshots deploy -DskipTests -DGITHUB_REPOSITORY=$GITHUB_REPOSITORY |