release-action/action.yml
2023-03-07 10:27:26 +01:00

59 lines
1.5 KiB
YAML

name: JReleaser
description: 'Release Java projects quickly and easily with JReleaser'
branding:
icon: 'archive'
color: 'gray-dark'
inputs:
version:
description: 'The version of JReleaser to download and execute.'
default: 'latest'
required: true
arguments:
description: 'The command-line arguments to be passed to JReleaser.'
default: 'full-release'
required: true
working-directory:
required: true
default: ${{ github.workspace }}
description: 'The directory to change into.'
setup-java:
default: 'true'
description: 'Setup internal Java runtime.'
required: false
java-opts:
default: ''
description: 'Additional JVM parameters'
required: false
runs:
using: 'composite'
steps:
- name: 'Setup Java'
uses: actions/setup-java@v3
if: ${{ inputs.setup-java == 'true' }}
with:
java-version: 17
distribution: 'zulu'
- name: 'Download JReleaser'
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
echo "::group::📦 Download JReleaser"
java "${{ github.action_path }}/get_jreleaser.java" ${{ inputs.version }}
java -jar jreleaser-cli.jar --version
echo "::endgroup::"
- name: 'Execute JReleaser'
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
echo "☕ java -jar jreleaser-cli.jar ${{ inputs.arguments }}"
java ${{ inputs.java-opts }} -jar jreleaser-cli.jar ${{ inputs.arguments }}