release-action/action.yml

60 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2021-03-27 18:54:08 +00:00
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.'
2021-04-06 16:47:36 +00:00
default: 'latest'
2021-03-27 18:54:08 +00:00
required: true
arguments:
description: 'The command-line arguments to be passed to JReleaser.'
2021-03-27 18:54:08 +00:00
default: 'full-release'
required: true
2021-03-30 10:03:01 +00:00
working-directory:
required: true
default: ${{ github.workspace }}
description: 'The directory to change into.'
2022-01-02 17:49:24 +00:00
setup-java:
default: 'true'
description: 'Setup internal Java runtime.'
2022-02-02 18:33:02 +00:00
required: false
2022-01-02 17:49:24 +00:00
2022-06-21 15:32:17 +00:00
java-opts:
default: ''
description: 'Additional JVM parameters'
required: false
2021-03-27 18:54:08 +00:00
runs:
using: 'composite'
steps:
2022-01-02 17:49:24 +00:00
- name: 'Setup Java'
2022-10-27 09:41:38 +00:00
uses: actions/setup-java@v3
if: ${{ inputs.setup-java == 'true' }}
2022-01-02 17:49:24 +00:00
with:
java-version: 17
distribution: 'zulu'
- name: 'Download JReleaser'
2021-03-27 18:54:08 +00:00
shell: bash
2021-03-30 10:03:01 +00:00
working-directory: ${{ inputs.working-directory }}
2021-03-27 18:54:08 +00:00
run: |
2021-03-28 20:15:43 +00:00
echo "::group::📦 Download JReleaser"
2021-04-06 14:47:34 +00:00
java "${{ github.action_path }}/get_jreleaser.java" ${{ inputs.version }}
java -jar jreleaser-cli.jar --version
2021-03-27 18:54:08 +00:00
echo "::endgroup::"
- name: 'Execute JReleaser'
2023-03-07 09:27:26 +00:00
shell: bash
2021-03-30 10:03:01 +00:00
working-directory: ${{ inputs.working-directory }}
2021-03-27 18:54:08 +00:00
run: |
echo "☕ java -jar jreleaser-cli.jar ${{ inputs.arguments }}"
2022-06-21 15:32:17 +00:00
java ${{ inputs.java-opts }} -jar jreleaser-cli.jar ${{ inputs.arguments }}