Skip to content

build

build #3

Workflow file for this run

name: build
on:
workflow_dispatch:
workflow_call:
inputs:
release:
type: boolean
required: false
description: ''
default: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache gradle files
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', 'gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build --no-daemon
env:
BUILD_ID: ${{ github.run_number }}
BUILD_RELEASE: ${{ inputs.release }}
- name: Upload JAR file
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: /build/libs/