From 3eedf3393787d4e1a1f1386d57cd685a982ad68d Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Sat, 23 Nov 2024 11:45:03 +0100 Subject: [PATCH] ci: add GPG setup for signing Signed-off-by: Jendrik Johannes --- .../flow-deploy-release-artifact.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/flow-deploy-release-artifact.yaml b/.github/workflows/flow-deploy-release-artifact.yaml index 4524700..1635e33 100644 --- a/.github/workflows/flow-deploy-release-artifact.yaml +++ b/.github/workflows/flow-deploy-release-artifact.yaml @@ -34,6 +34,28 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 + - name: Install GnuPG Tools + run: | + if ! command -v gpg2 >/dev/null 2>&1; then + echo "::group::Updating APT Repository Indices" + sudo apt update + echo "::endgroup::" + echo "::group::Installing GnuPG Tools" + sudo apt install -y gnupg2 + echo "::endgroup::" + fi + + - name: Import GPG key + id: gpg_key + uses: step-security/ghaction-import-gpg@6c8fe4d0126a59d57c21f87c9ae5dd3451fa3cca # v6.1.0 + with: + gpg_private_key: ${{ secrets.GPG_KEY_CONTENTS }} + passphrase: ${{ secrets.GPG_KEY_PASSPHRASE }} + git_config_global: true + git_user_signingkey: true + git_commit_gpgsign: true + git_tag_gpgsign: true + - name: Gradle Plugin Portal Release env: GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}