release-action/action.yml

55 lines
1.4 KiB
YAML
Raw 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
2021-03-27 18:54:08 +00:00
runs:
using: 'composite'
steps:
2022-01-02 17:49:24 +00:00
- name: 'Setup Java'
uses: actions/setup-java@v2
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'
2022-02-02 21:34:56 +00:00
shell: pwsh
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 }}"
java -jar jreleaser-cli.jar ${{ inputs.arguments }}