Make running shell configurable
This commit is contained in:
parent
f4b19f681f
commit
7feb30071b
2 changed files with 22 additions and 4 deletions
14
README.adoc
14
README.adoc
|
@ -63,6 +63,17 @@ jobs:
|
|||
uses: jreleaser/release-action@v2
|
||||
env:
|
||||
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Persist logs
|
||||
|
||||
- name: JReleaser release output
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: jreleaser-release
|
||||
path: |
|
||||
out/jreleaser/trace.log
|
||||
out/jreleaser/output.properties
|
||||
----
|
||||
|
||||
WARNING: Note the `fetch-depth: 0` option on the `Checkout` workflow step. It is required for JReleaser to work properly.
|
||||
|
@ -88,6 +99,9 @@ Following inputs can be used as `step.with` keys
|
|||
Should match any of the link:https://github.com/jreleaser/jreleaser/releases[published releases]. +
|
||||
You may use `latest` to pull the latest stable release or +
|
||||
`early-access` to pull the latest snapshot.
|
||||
| shell | String | bash | The shell used to run JReleaser. +
|
||||
Refer to the link:https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell[official docs]
|
||||
to learn more about the different shell types.
|
||||
| arguments | String | full-release | The JReleaser command to run.
|
||||
| working-directory | String | ${{ github.workspace }} | The directory to change into. +
|
||||
Defaults to the directory the calling workflow runs in.
|
||||
|
|
12
action.yml
12
action.yml
|
@ -7,12 +7,16 @@ branding:
|
|||
color: 'gray-dark'
|
||||
|
||||
inputs:
|
||||
|
||||
version:
|
||||
description: 'The version of JReleaser to download and execute.'
|
||||
default: 'latest'
|
||||
required: true
|
||||
|
||||
shell:
|
||||
description: 'The shell used to run JReleaser.'
|
||||
default: 'bash'
|
||||
required: false
|
||||
|
||||
arguments:
|
||||
description: 'The command-line arguments to be passed to JReleaser.'
|
||||
default: 'full-release'
|
||||
|
@ -24,16 +28,16 @@ inputs:
|
|||
description: 'The directory to change into.'
|
||||
|
||||
setup-java:
|
||||
required: false
|
||||
default: 'true'
|
||||
description: 'Setup internal Java runtime.'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 'Setup Java'
|
||||
uses: actions/setup-java@v2
|
||||
if: ${{ inputs.setup-java }} == 'true'
|
||||
if: ${{ inputs.setup-java }} == 'true' || ${{ inputs.setup-java }} == true
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: 'zulu'
|
||||
|
@ -48,7 +52,7 @@ runs:
|
|||
echo "::endgroup::"
|
||||
|
||||
- name: 'Execute JReleaser'
|
||||
shell: bash
|
||||
shell: ${{ inputs.shell }}
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
run: |
|
||||
echo "☕ java -jar jreleaser-cli.jar ${{ inputs.arguments }}"
|
||||
|
|
Loading…
Reference in a new issue