Update Workflows

This commit is contained in:
AngrySoundTech
2024-02-07 20:40:31 -05:00
parent e5f376125b
commit 017a00b226
3 changed files with 39 additions and 21 deletions

View File

@@ -7,7 +7,6 @@ on:
project:
description: 'The project to build'
type: string
required: true
jobs:
build_gradle:
@@ -30,7 +29,7 @@ jobs:
env:
CI: true
with:
arguments: '${{inputs.project}}:build --scan'
arguments: "${{inputs.project && format('{0}:', inputs.project)}}build --scan"
- name: Upload Build Artifact
uses: actions/upload-artifact@v3

View File

@@ -0,0 +1,38 @@
# This workflow can be used to publish any gradle project in the repo
name: Publish Gradle Project
on:
workflow_call:
inputs:
project:
description: 'The project to publish'
type: string
jobs:
publish_gradle:
name: Publish 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 Publish
uses: gradle/gradle-build-action@v2
env:
CI: true
with:
arguments: "${{inputs.project && format('{0}:', inputs.project)}}publish --scan"
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: gradle-build
path: '**/build/libs/*'