Add build workflow to GitHub actions #2
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
name: Build with Gradle | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# https://github.com/actions/setup-java | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'liberica' | |
# https://github.com/gradle/gradle-build-action | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Build with Gradle | |
uses: gradle/[email protected] | |
with: | |
arguments: build | |
# https://github.com/actions/upload-artifact | |
- name: Upload build reports | |
uses: actions/upload-artifact@v3 | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: build-reports | |
path: build/reports/ |