Skip to content

Setup github action to cancel inprogress jobs for PR checks #2

Setup github action to cancel inprogress jobs for PR checks

Setup github action to cancel inprogress jobs for PR checks #2

Workflow file for this run

name: Build
on:
push:
branches:
- master
permissions:
contents: write
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Setup and execute Gradle 'publish' task
uses: gradle/gradle-build-action@v2
with:
arguments: publish
build-root-directory: Src/java
env:
OSSRH_USERNAME: ${{ vars.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}