1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-14 22:22:24 +00:00

gradle, build and sign artifacts in 2 steps

release is not from windows 2019, daemon can be used
This commit is contained in:
soloturn 2022-02-11 11:14:55 +01:00
parent ad222ccc1b
commit 8603c8da91

View File

@ -78,8 +78,6 @@ jobs:
os: ubuntu-20.04
java_version: 8
runs-on: ${{ matrix.os }}
env:
SIGN_ARTIFACTS: ${{ secrets.ARTIFACT_SIGNING_KEY != '' }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2
@ -101,6 +99,10 @@ jobs:
# The repeated "matrix.release_from_this_build" checks are messy, but I have not found a simple way to avoid them
# See https://github.com/actions/runner/issues/662
- name: Create artifacts
if: matrix.release_from_this_build
run: gradle -q build -x test
- name: Setup gpg
if: matrix.release_from_this_build && env.ARTIFACT_SIGNING_KEY
id: gpg
@ -114,14 +116,13 @@ jobs:
key_id="$(echo "${ARTIFACT_SIGNING_KEY}" | gpg --batch --show-keys --with-colons | awk -F: '$1 == "sec" { print $5 }')"
echo "::set-output name=key_id::${key_id}"
- name: Create artifacts
if: matrix.release_from_this_build
- name: Sign artifacts
if: matrix.release_from_this_build && env.ARTIFACT_SIGNING_KEY
env:
GPG_KEYNAME: ${{ steps.gpg.outputs.key_id }}
GPG_PASSPHRASE: ${{ secrets.ARTIFACT_SIGNING_PASSPHRASE }}
run: |
gradle sign "-Pversion=${POM_VERSION}"\
"--no-daemon" \
"-Psigning.gnupg.keyName=${GPG_KEYNAME}" \
"-Psigning.gnupg.passphrase=${GPG_PASSPHRASE}"