mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-15 23:20:44 +00:00
44 lines
993 B
YAML
44 lines
993 B
YAML
# This workflow can be used to build any gradle project in the repo
|
|
name: Gradle | Build Project
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
project:
|
|
description: 'The project to build'
|
|
type: string
|
|
workflow_call:
|
|
inputs:
|
|
project:
|
|
description: 'The project to build'
|
|
type: string
|
|
|
|
jobs:
|
|
build_gradle:
|
|
name: Build Gradle
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Ensure Wrapper Permissions
|
|
run: chmod +x ./gradlew
|
|
|
|
- uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
|
|
- name: Gradle Build
|
|
uses: gradle/gradle-build-action@v2
|
|
env:
|
|
CI: true
|
|
with:
|
|
arguments: "${{inputs.project && format('{0}:', inputs.project)}}build --scan"
|
|
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: gradle-build
|
|
path: '**/build/libs/*'
|