Skip to content

Add buildinfo implementation #3

Add buildinfo implementation

Add buildinfo implementation #3

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Checkout
uses: actions/checkout@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11
# v3.3.0
with:
validate-wrappers: true
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run tests
run: ./gradlew check javadoc publish sonar -s -Pversion=${BUILD_LABEL//\//_}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
BUILD_LABEL: ${{ github.head_ref || github.ref_name }}