mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
# Attach artifacts to a github release
|
|
name: Gradle | Release Project
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
category:
|
|
required: true
|
|
description: 'The category of project'
|
|
type: choice
|
|
options:
|
|
- plugins
|
|
project:
|
|
required: true
|
|
description: 'The project to build'
|
|
type: string
|
|
workflow_call:
|
|
inputs:
|
|
category:
|
|
required: true
|
|
description: 'The category of project'
|
|
type: string
|
|
project:
|
|
required: true
|
|
description: 'The project to build'
|
|
type: string
|
|
|
|
jobs:
|
|
release_gradle:
|
|
name: Release Gradle
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
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: "plugins:${{inputs.category}}:${{inputs.project}} build --scan"
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: '${{inputs.category}}/${{inputs.project}}/build/libs/*'
|