Skip to content

Commit

Permalink
Fix Java Gradle Publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick-roeder committed Oct 18, 2023
1 parent cd9046c commit 1d96a6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions actions/java-gradle-publish/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ runs:
gradle-cache: ${{ inputs.gradle-cache }}

- name: Publish to Nexus
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
export SIGNING_SECRET_KEY_RING_FILE="$(mktemp -d)/secring.gpg"
echo '${{ inputs.signing-secret-key-ring }}' | base64 -d > $SIGNING_SECRET_KEY_RING_FILE
Expand All @@ -68,14 +69,16 @@ runs:
CI: "true"

- name: Release to Nexus
if: startsWith(github.ref, 'refs/tags/')
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
export SIGNING_SECRET_KEY_RING_FILE="$(mktemp -d)/secring.gpg"
echo '${{ inputs.signing-secret-key-ring }}' | base64 -d > $SIGNING_SECRET_KEY_RING_FILE
./gradlew --info --stacktrace closeAndReleaseRepository -x test
./gradlew --info --stacktrace publishtoNexus closeAndReleaseRepository -x test
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
SIGNING_KEY_ID: "${{ inputs.signing-key-id }}"
SIGNING_PASSWORD: "${{ inputs.signing-password }}"
OSSRH_USERNAME: "${{ inputs.ossrh-username }}"
OSSRH_PASSWORD: "${{ inputs.ossrh-password }}"
CI: "true"

0 comments on commit 1d96a6e

Please sign in to comment.