From 7feb30071b2d00a7e0207cba898a34b18231ba66 Mon Sep 17 00:00:00 2001 From: Andres Almiray Date: Wed, 2 Feb 2022 19:33:02 +0100 Subject: [PATCH] Make running shell configurable --- README.adoc | 14 ++++++++++++++ action.yml | 12 ++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.adoc b/README.adoc index 50f2a87..0a32797 100644 --- a/README.adoc +++ b/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. diff --git a/action.yml b/action.yml index 98f4cce..4bad64c 100644 --- a/action.yml +++ b/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 }}"